tree: 3fa3aeb0bc9831c3062a34959b2f00a01329799e [path history] [tgz]
  1. index.js
  2. license
  3. package.json
  4. readme.md
third_party/devtools/node_modules/map-obj/readme.md

map-obj Build Status

Map object keys and values into a new object

Install

$ npm install --save map-obj

Usage

var mapObj = require('map-obj');

var newObject = mapObj({foo: 'bar'}, function (key, value, object) {
	// first element is the new key and second is the new value
	// here we reverse the order
	return [value, key];
});
//=> {bar: 'foo'}

License

MIT © Sindre Sorhus