lepu-test-platform-web/node_modules/map-obj
zhangbo db3ebd0df0 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
..
index.js 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
license 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
package.json 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
readme.md 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00

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