Nervous Penpal Message

    lodash-omitdeep
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.12 • Public • Published

    lodash-omitdeep

    Lodash omitDeep/omitDeepBy object key/value recursively

    lodash-omitdeep allows you to execute lodash omit, omitBy functions recursively.

    Install

    Install with npm

    $ npm i lodash-omitdeep --save

    Install with yarn

    $ yarn add lodash-omitdeep

    Usage

    omitDeep

    import { omitDeep } from 'lodash-omitdeep';
    omitDeep({ a: 'a', b: 'b', c: { b: 'b', d: { b: 'b', f: 'f' } } }, 'b');
    //=> {a: "a", c: {d: {f: "f"}}}
    omitDeep({ a: 'a', b: 'b', c: { b: 'b', d: { b: 'b', f: 'f' } } }, ['a', 'b']);
    //=> {c: {d: {f: "f"}}}

    omitDeepBy

    import { omitDeepBy } from 'lodash-omitdeep';
    import isNil from 'lodash/isNil';
    import isNumber from 'lodash/isNumber';
    
    omitDeepBy({ a: 'a', b: null, c: { b: 'b', d: { b: 'b', f: null } } }, isNil);
    //=> {a: "a", c: {b: "b", d: {b: "b"}}}
    omitDeepBy({ a: 2, b: 'b', c: { b: 4, d: { b: 1, f: 'f' } } }, isNumber);
    //=> {b: "b", c: {d: {f: "f"}}}

    Contributing

    Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

    Author

    License

    Released under the MIT license.

    Install

    npm i lodash-omitdeep

    DownloadsWeekly Downloads

    937

    Version

    1.0.12

    License

    ISC

    Unpacked Size

    8.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • hwapedro