object-substract

1.0.2 • Public • Published

CircleCI codecov

object-substract

Lightweight and easy to use tool for deeply removing a subset of fields from an object.

import substract from 'object-substract'
 
const source = {
  foo: [
    { foo: 'foo' },
    { bar: 'bar' },
    0,
  ]
}
const target = {
  foo: [
    { foo: 'foo' },
    0,
  ]
}
 
console.log(substract(source, target))
/*
{
  foo: [
    { bar: 'bar' },
  ],
}
*/

Readme

Keywords

none

Package Sidebar

Install

npm i object-substract

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • emaincourt