Package Exports
- map-o
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (map-o) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
map-o 
Array-map like function for objects.
Installation
$ npm i map-oExample
// Dependencies
var Mapo = require("map-o");
// Modify this object
console.log(Mapo({
location: "Earth"
, age: 10
}, function (name, value) {
if (name === "location") {
return "Location: " + value;
}
if (value === 10) {
return 42;
}
}));
// => { location: 'Location: Earth', age: 42 }
Documentation
Mapo(obj, fn, clone)
Array-map like for objects.
Params
- Object
obj: The input object. - Function
fn: A function returning the field values. - Boolean
clone: Iftrue, the input object will be cloned, so the original object will not be changed.
Return
- Object The modified object.
proto()
Appends the map method to the Object prototype.
How to contribute
Have an idea? Found a bug? See how to contribute.
License
KINDLY © Ionică Bizău–The LICENSE file contains a copy of the license.