property-map
Apply a function to each property of an object
Install
npm install property-map
API
propertyMap(baseObj, callback [, thisObject]);
callback is a function that can accept up to three arguments:
value
The value for each property in baseObj
key (optional)
The key for each property in baseObj
baseObj (optional)
The baseObj
Usage
// commonJS...var propertyMap = ;// ...or es2015; ; // {a: 5, b: 7, c: 4} ; // {a: 1, b: undefined, c: 3}
Tests
npm test