Have ideas to improve npm?Join in the discussion! »

@michaelqq/deepomit

1.0.3 • Public • Published

deepOmit

deep omit function base on ramda.js

Usage

deepOmit :: [String] -> Any -> Any

const deepOmit = require('deepOmit');
 
const objectKeyToBeOmit = ['key1', 'key2']
const srcObject = {
  key1: 1,
  key2: 2,
  key3: 3
}
deepOmit(objectKeyToBeOmit, srcObject)
// { key3: 3 } 
 
const objectKeyToBeOmit = ['key1', 'key2']
const srcObjectArray = [{
  key1: 1,
  key2: 2,
  key3: 3
}, {
  key1: 1,
  key3: 3
}]
deepOmit(objectKeyToBeOmit, srcObject)
// [{ key3: 3 }, { key3: 3 }]

Keywords

Install

npm i @michaelqq/deepomit

DownloadsWeekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

5.8 kB

Total Files

6

Last publish

Collaborators

  • avatar