@zippytech/assign-filter

2.0.1 • Public • Published

assign-filter

Object.assign that allows filtering of the copied keys from source objects

Install

$ npm i @zippytech/assign-filter --save

Usage

var assignFilter = require('@zippytech/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 }

LICENSE

Apache2

Dependents (1)

Package Sidebar

Install

npm i @zippytech/assign-filter

Weekly Downloads

1

Version

2.0.1

License

Apache-2.0

Last publish

Collaborators

  • zippyui