1.1.0 • Published 8 years ago

structure-mapper v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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.