$ npm install just-omit
Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.
npm install just-omit
yarn add just-omit
Copy an object but omit the specified keys
import omit from 'just-omit';
var obj = {a: 3, b: 5, c: 9};
omit(obj, ['a', 'c']); // {b: 5}
omit(obj, 'a', 'c'); // {b: 5}
omit(obj, ['a', 'b', 'd']); // {c: 9}
omit(obj, ['a', 'a']); // {b: 5, c: 9}
© 2010 - cnpmjs.org x YWFE | Home | YWFE