Package Exports
- assign-filter
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 (assign-filter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
assign-filter
Object.assign that allows filtering of the copied keys from source objects
Install
$ npm i assign-filter --saveUsage
var assignFilter = require('assign-filter')
var isDefined = function(value, prop, object) {
return value !== undefined
}
var target = {}
//only copy defined properties
assignFilter(isDefined, target, { a: undefined, b: 1 }, { c: 2 })
//target is { b: 1, c: 2 }