just-omit
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

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}

/just-omit/

    Package Sidebar

    Install

    npm i just-omit

    Weekly Downloads

    25,159

    Version

    2.2.0

    License

    MIT

    Unpacked Size

    5.01 kB

    Total Files

    9

    Last publish

    Collaborators

    • angus-c