ShenNong/packages/字体精简工具/node_modules/map-obj
2024-06-21 18:44:06 +08:00
..
index.js 神农首次提交 2024-06-21 18:44:06 +08:00
license 神农首次提交 2024-06-21 18:44:06 +08:00
package.json 神农首次提交 2024-06-21 18:44:06 +08:00
readme.md 神农首次提交 2024-06-21 18:44:06 +08:00

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