TransformA2B is a data transformation tool that helps you convert data from one format to another.
This project is all about transforming data. It's designed to make it easy to convert data from one format to another, hence the name "Transforma2B" or "A2B".
To install the project, you can use pnpm or any other package manager:
pnpm add transforma2b
The project provides a transformA2B
function that you can use to convert data types. For example:
const a = { a: "test" };
const { data, transform } = transformA2B(a, (a) => {
return {
...a,
b: "test",
};
}).transform((b) => {
return {
...b,
c: "test" as "test",
};
});
console.log(data); // { a: "test", b: "test", c: "test"}
We used Vitest to run the tests. You can run all the tests with the following command:
pnpm run test
If you want to contribute to this project, you are welcome to submit a PR.
This project is under the MIT license.