amis-rpc-design/node_modules/filter-obj
2023-10-07 19:42:30 +08:00
..
index.js v1.0.0 2023-10-07 19:42:30 +08:00
license v1.0.0 2023-10-07 19:42:30 +08:00
package.json v1.0.0 2023-10-07 19:42:30 +08:00
readme.md v1.0.0 2023-10-07 19:42:30 +08:00

filter-obj Build Status

Filter object keys and values into a new object

Install

$ npm install --save filter-obj

Usage

var filterObj = require('filter-obj');

var obj = {
	foo: true,
	bar: false
};

var newObject = filterObj(obj, function (key, value, object) {
	return value === true;
});
//=> {foo: true}

var newObject2 = filterObj(obj, ['bar']);
//=> {bar: true}
  • map-obj - Map object keys and values into a new object
  • object-assign - Copy enumerable own properties from one or more source objects to a target object

License

MIT © Sindre Sorhus