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

1.3.5 • Public • Published

♻️ Lodash Omit Deep

Lodash omitDeep/omitDeepBy object key/value recursively

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

Install

Install with npm or yarn

$ npm i lodash-omitdeep --save
# or
$ yarn add lodash-omitdeep

Usage

Install ♻️ Lodash Omit Deep with npm or yarn

$ npm i lodash-omitdeep --save
# or
$ yarn add lodash-omitdeep

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"}}}

✨ Contributors

debabin
☄️ debabin

Package Sidebar

Install

npm i lodash-omitdeep

Weekly Downloads

4,119

Version

1.3.5

License

MIT

Unpacked Size

24.6 kB

Total Files

20

Last publish

Collaborators

  • hwapedro