just-omit

copy an object but omit the specified keys

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
just-omit
2.2.0a year ago8 years agoMinified + gzip package size for just-omit in KB

Readme

just-omit

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.
🍦 Try it
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}