1.0.2 • Published 6 years ago

object-substract v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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' },
  ],
}
*/