npm

Join us for the "JavaScript Supply Chain Security" tech talk, presented by VP of Security, Adam Baldwin. 6/20 at 10am PT.Sign up here »

@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

install

npm i @zippytech/assign-filter

Downloadsweekly downloads

0

version

2.0.1

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability