structure-mapper
v1.1.0
Published
Structure mapper gives the posibility to map any object into another with different structure.
Downloads
5
Maintainers
Readme
structure-mapper
Structure mapper gives the posibility to map any object into another with different structure.
Examples
import mapper from 'structure-mapper';
const src = { foo: 123 };
const map = { foo: 'bar' };
const result = { bar: 123 };
expect(mapper(src, map)).toEqual(result);
To see more complex examples, check out this project's test suite.