structure-mapper

1.1.0 • Public • Published

structure-mapper

Build Status Coverage Status npm npm

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.

Package Sidebar

Install

npm i structure-mapper

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • mprzodala