0.0.1 • Published 8 years ago
@fand/map-merge v0.0.1
map-merge
Installation
npm install -S @fand/map-merge
Example
import mapMerge from "map-merge";
const src = [{
name : 'foo',
value : 123,
}, {
name : 'bar',
value : 456,
}]
const dst = mapMerge(src, (e) => ({ [e.name] : e.value }));
assert.deepEqual(dst, { foo : 123, bar : 456 });
LICENSE
MIT
0.0.1
8 years ago