lodash-omitdeep 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,64 +1,64 @@
1
- # ♻️ Lodash Omit Deep
2
-
3
- > Lodash omitDeep/omitDeepBy object key/value recursively
4
-
5
- lodash-omitdeep allows you to execute lodash omit, omitBy functions recursively.
6
-
7
- ## Install
8
-
9
- Install with [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)
10
-
11
- ```bash
12
- $ npm i lodash-omitdeep --save
13
- # or
14
- $ yarn add lodash-omitdeep
15
- ```
16
-
17
- ## Usage
18
-
19
- Install **♻️ Lodash Omit Deep** with [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)
20
-
21
- ```bash
22
- $ npm i lodash-omitdeep --save
23
- # or
24
- $ yarn add lodash-omitdeep
25
- ```
26
-
27
- ### omitDeep
28
-
29
- ```js
30
- import { omitDeep } from 'lodash-omitdeep';
31
- omitDeep({ a: 'a', b: 'b', c: { b: 'b', d: { b: 'b', f: 'f' } } }, 'b');
32
- //=> {a: "a", c: {d: {f: "f"}}}
33
- omitDeep({ a: 'a', b: 'b', c: { b: 'b', d: { b: 'b', f: 'f' } } }, ['a', 'b']);
34
- //=> {c: {d: {f: "f"}}}
35
- ```
36
-
37
- ### omitDeepBy
38
-
39
- ```js
40
- import { omitDeepBy } from 'lodash-omitdeep';
41
- import isNil from 'lodash/isNil';
42
- import isNumber from 'lodash/isNumber';
43
-
44
- omitDeepBy({ a: 'a', b: null, c: { b: 'b', d: { b: 'b', f: null } } }, isNil);
45
- //=> {a: "a", c: {b: "b", d: {b: "b"}}}
46
- omitDeepBy({ a: 2, b: 'b', c: { b: 4, d: { b: 1, f: 'f' } } }, isNumber);
47
- //=> {b: "b", c: {d: {f: "f"}}}
48
- ```
49
-
50
- ## ✨ Contributors
51
-
52
- <table>
53
- <tr>
54
- <td align="center" style="word-wrap: break-word; width: 100.0; height: 100.0">
55
- <a href="https://github.com/debabin">
56
- <img src="https://avatars.githubusercontent.com/u/45297354?v=4"
57
- width="100;"
58
- alt="debabin" />
59
- <br />
60
- <sub style="font-size:13px"><b>☄️ debabin</b></sub>
61
- </a>
62
- </td>
63
- </tr>
64
- </table>
1
+ # ♻️ Lodash Omit Deep
2
+
3
+ > Lodash omitDeep/omitDeepBy object key/value recursively
4
+
5
+ lodash-omitdeep allows you to execute lodash omit, omitBy functions recursively.
6
+
7
+ ## Install
8
+
9
+ Install with [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)
10
+
11
+ ```bash
12
+ $ npm i lodash-omitdeep --save
13
+ # or
14
+ $ yarn add lodash-omitdeep
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ Install **♻️ Lodash Omit Deep** with [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)
20
+
21
+ ```bash
22
+ $ npm i lodash-omitdeep --save
23
+ # or
24
+ $ yarn add lodash-omitdeep
25
+ ```
26
+
27
+ ### omitDeep
28
+
29
+ ```js
30
+ import { omitDeep } from 'lodash-omitdeep';
31
+ omitDeep({ a: 'a', b: 'b', c: { b: 'b', d: { b: 'b', f: 'f' } } }, 'b');
32
+ //=> {a: "a", c: {d: {f: "f"}}}
33
+ omitDeep({ a: 'a', b: 'b', c: { b: 'b', d: { b: 'b', f: 'f' } } }, ['a', 'b']);
34
+ //=> {c: {d: {f: "f"}}}
35
+ ```
36
+
37
+ ### omitDeepBy
38
+
39
+ ```js
40
+ import { omitDeepBy } from 'lodash-omitdeep';
41
+ import isNil from 'lodash/isNil';
42
+ import isNumber from 'lodash/isNumber';
43
+
44
+ omitDeepBy({ a: 'a', b: null, c: { b: 'b', d: { b: 'b', f: null } } }, isNil);
45
+ //=> {a: "a", c: {b: "b", d: {b: "b"}}}
46
+ omitDeepBy({ a: 2, b: 'b', c: { b: 4, d: { b: 1, f: 'f' } } }, isNumber);
47
+ //=> {b: "b", c: {d: {f: "f"}}}
48
+ ```
49
+
50
+ ## ✨ Contributors
51
+
52
+ <table>
53
+ <tr>
54
+ <td align="center" style="word-wrap: break-word; width: 100.0; height: 100.0">
55
+ <a href="https://github.com/debabin">
56
+ <img src="https://avatars.githubusercontent.com/u/45297354?v=4"
57
+ width="100;"
58
+ alt="debabin" />
59
+ <br />
60
+ <sub style="font-size:13px"><b>☄️ debabin</b></sub>
61
+ </a>
62
+ </td>
63
+ </tr>
64
+ </table>
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./omitDeep/omitDeep.cjs"),t=require("./omitDeepBy/omitDeepBy.cjs");exports.omitDeep=e.omitDeep;exports.omitDeepBy=t.omitDeepBy;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("lodash"),o=i=>!n.isNil(i)&&(n.isPlainObject(i)||Array.isArray(i)),a=(i,...t)=>{function u(r){if(!Array.isArray(r)&&!n.isPlainObject(r))return r;if(Array.isArray(r))return r.map(e=>o(e)?a(e,...t):e);const y={};for(const[e,s]of Object.entries(r))y[e]=o(s)?a(s,...t):s;return n.omit(y,...t)}return u(i)};exports.needOmit=o;exports.omitDeep=a;
2
+ //# sourceMappingURL=omitDeep.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omitDeep.cjs","sources":["../../../src/omitDeep/omitDeep.ts"],"sourcesContent":["import type { Many, PartialObject, PropertyName } from 'lodash';\r\n\r\nimport lodash from 'lodash';\r\n\r\nexport const needOmit = (value: any) =>\r\n !lodash.isNil(value) && (lodash.isPlainObject(value) || Array.isArray(value));\r\n\r\ninterface OmitDeep {\r\n <T extends object, K extends PropertyName[]>(\r\n object: T | null | undefined,\r\n ...paths: K\r\n ): Pick<T, Exclude<keyof T, K[number]>>;\r\n <T extends object, K extends keyof T>(\r\n object: T | null | undefined,\r\n ...paths: Many<K>[]\r\n ): Omit<T, K>;\r\n <T extends object>(\r\n object: T | null | undefined,\r\n ...paths: Many<PropertyName>[]\r\n ): PartialObject<T>;\r\n}\r\n\r\n/**\r\n * The opposite of `_.pick`; this method creates an object composed of the\r\n * own and inherited enumerable properties of `object` that are not omitted.\r\n *\r\n * @category Function\r\n * @param object The source object.\r\n * @param [paths] The property names to omit, specified\r\n * individually or in arrays.\r\n * @returns Returns the new object.\r\n * @example\r\n *\r\n * const object = { 'a': 1, 'b': 2, 'c': { 'a': 1, 'b': 2 } };\r\n *\r\n * omitDeep(object, ['b', 'a']);\r\n * // => { 'c': {} }\r\n */\r\nexport const omitDeep: OmitDeep = (object: any, ...paths: any) => {\r\n function omitDeepOnOwnProps(object: any) {\r\n if (!Array.isArray(object) && !lodash.isPlainObject(object)) {\r\n return object;\r\n }\r\n\r\n if (Array.isArray(object)) {\r\n return object.map((element) => (needOmit(element) ? omitDeep(element, ...paths) : element));\r\n }\r\n\r\n const temp = {};\r\n\r\n for (const [key, value] of Object.entries<{\r\n [x: string]: object | PropertyName;\r\n }>(object)) {\r\n (temp as any)[key] = needOmit(value) ? omitDeep(value, ...paths) : value;\r\n }\r\n return lodash.omit(temp, ...paths);\r\n }\r\n\r\n return omitDeepOnOwnProps(object);\r\n};\r\n"],"names":["needOmit","value","lodash","omitDeep","object","paths","omitDeepOnOwnProps","element","temp","key"],"mappings":"0GAIaA,EAAYC,GACvB,CAACC,EAAO,MAAMD,CAAK,IAAMC,EAAO,cAAcD,CAAK,GAAK,MAAM,QAAQA,CAAK,GAiChEE,EAAqB,CAACC,KAAgBC,IAAe,CAChE,SAASC,EAAmBF,EAAa,CACnC,GAAA,CAAC,MAAM,QAAQA,CAAM,GAAK,CAACF,EAAO,cAAcE,CAAM,EACjDA,OAAAA,EAGL,GAAA,MAAM,QAAQA,CAAM,EACtB,OAAOA,EAAO,IAAKG,GAAaP,EAASO,CAAO,EAAIJ,EAASI,EAAS,GAAGF,CAAK,EAAIE,CAAQ,EAG5F,MAAMC,EAAO,CAAC,EAEd,SAAW,CAACC,EAAKR,CAAK,IAAK,OAAO,QAE/BG,CAAM,EACNI,EAAaC,CAAG,EAAIT,EAASC,CAAK,EAAIE,EAASF,EAAO,GAAGI,CAAK,EAAIJ,EAErE,OAAOC,EAAO,KAAKM,EAAM,GAAGH,CAAK,CAAA,CAGnC,OAAOC,EAAmBF,CAAM,CAClC"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash"),i=(s,e)=>{function y(r){if(!Array.isArray(r)&&!o.isPlainObject(r))return r;if(Array.isArray(r))return r.map(t=>i(t,e));const n={};for(const[t,a]of Object.entries(r))n[t]=i(a,e);return o.omitBy(n,e)}return y(s)};exports.omitDeepBy=i;
2
+ //# sourceMappingURL=omitDeepBy.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omitDeepBy.cjs","sources":["../../../src/omitDeepBy/omitDeepBy.ts"],"sourcesContent":["import type {\r\n Dictionary,\r\n NumericDictionary,\r\n PartialObject,\r\n PropertyName,\r\n ValueKeyIteratee\r\n} from 'lodash';\r\n\r\nimport lodash from 'lodash';\r\n\r\ninterface OmitDeepBy {\r\n <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;\r\n <T>(\r\n object: NumericDictionary<T> | null | undefined,\r\n predicate?: ValueKeyIteratee<T>\r\n ): NumericDictionary<T>;\r\n <T extends object>(\r\n object: T | null | undefined,\r\n predicate: ValueKeyIteratee<T[keyof T]>\r\n ): PartialObject<T>;\r\n}\r\n\r\n/**\r\n * The opposite of `_.pickBy`; this method creates an object composed of the\r\n * own and inherited enumerable properties of `object` that `predicate`\r\n * doesn't return truthy for.\r\n *\r\n * @category Function\r\n * @param object The source object.\r\n * @param [predicate] The function invoked per property.\r\n * @returns Returns the new object.\r\n * @example\r\n *\r\n * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };\r\n *\r\n * omitByDeep(object, _.isNil);\r\n * // => { 'a': 1, 'c': { 'a': 1 } }\r\n */\r\nexport const omitDeepBy: OmitDeepBy = (object: any, cb: any) => {\r\n function omitByDeepByOnOwnProps(object: any) {\r\n if (!Array.isArray(object) && !lodash.isPlainObject(object)) {\r\n return object;\r\n }\r\n\r\n if (Array.isArray(object)) {\r\n return object.map((element) => omitDeepBy(element, cb));\r\n }\r\n\r\n const temp = {};\r\n\r\n for (const [key, value] of Object.entries<{\r\n [x: string]: object | PropertyName;\r\n }>(object)) {\r\n (temp as any)[key] = omitDeepBy(value, cb);\r\n }\r\n return lodash.omitBy(temp, cb);\r\n }\r\n\r\n return omitByDeepByOnOwnProps(object);\r\n};\r\n"],"names":["omitDeepBy","object","cb","omitByDeepByOnOwnProps","lodash","element","temp","key","value"],"mappings":"0GAsCaA,EAAyB,CAACC,EAAaC,IAAY,CAC9D,SAASC,EAAuBF,EAAa,CACvC,GAAA,CAAC,MAAM,QAAQA,CAAM,GAAK,CAACG,EAAO,cAAcH,CAAM,EACjDA,OAAAA,EAGL,GAAA,MAAM,QAAQA,CAAM,EACtB,OAAOA,EAAO,IAAKI,GAAYL,EAAWK,EAASH,CAAE,CAAC,EAGxD,MAAMI,EAAO,CAAC,EAEd,SAAW,CAACC,EAAKC,CAAK,IAAK,OAAO,QAE/BP,CAAM,EACNK,EAAaC,CAAG,EAAIP,EAAWQ,EAAON,CAAE,EAEpC,OAAAE,EAAO,OAAOE,EAAMJ,CAAE,CAAA,CAG/B,OAAOC,EAAuBF,CAAM,CACtC"}
@@ -0,0 +1,7 @@
1
+ import { omitDeep as m } from "./omitDeep/omitDeep.mjs";
2
+ import { omitDeepBy as r } from "./omitDeepBy/omitDeepBy.mjs";
3
+ export {
4
+ m as omitDeep,
5
+ r as omitDeepBy
6
+ };
7
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,19 @@
1
+ import s from "lodash";
2
+ const y = (i) => !s.isNil(i) && (s.isPlainObject(i) || Array.isArray(i)), e = (i, ...t) => {
3
+ function f(r) {
4
+ if (!Array.isArray(r) && !s.isPlainObject(r))
5
+ return r;
6
+ if (Array.isArray(r))
7
+ return r.map((n) => y(n) ? e(n, ...t) : n);
8
+ const a = {};
9
+ for (const [n, o] of Object.entries(r))
10
+ a[n] = y(o) ? e(o, ...t) : o;
11
+ return s.omit(a, ...t);
12
+ }
13
+ return f(i);
14
+ };
15
+ export {
16
+ y as needOmit,
17
+ e as omitDeep
18
+ };
19
+ //# sourceMappingURL=omitDeep.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omitDeep.mjs","sources":["../../../src/omitDeep/omitDeep.ts"],"sourcesContent":["import type { Many, PartialObject, PropertyName } from 'lodash';\r\n\r\nimport lodash from 'lodash';\r\n\r\nexport const needOmit = (value: any) =>\r\n !lodash.isNil(value) && (lodash.isPlainObject(value) || Array.isArray(value));\r\n\r\ninterface OmitDeep {\r\n <T extends object, K extends PropertyName[]>(\r\n object: T | null | undefined,\r\n ...paths: K\r\n ): Pick<T, Exclude<keyof T, K[number]>>;\r\n <T extends object, K extends keyof T>(\r\n object: T | null | undefined,\r\n ...paths: Many<K>[]\r\n ): Omit<T, K>;\r\n <T extends object>(\r\n object: T | null | undefined,\r\n ...paths: Many<PropertyName>[]\r\n ): PartialObject<T>;\r\n}\r\n\r\n/**\r\n * The opposite of `_.pick`; this method creates an object composed of the\r\n * own and inherited enumerable properties of `object` that are not omitted.\r\n *\r\n * @category Function\r\n * @param object The source object.\r\n * @param [paths] The property names to omit, specified\r\n * individually or in arrays.\r\n * @returns Returns the new object.\r\n * @example\r\n *\r\n * const object = { 'a': 1, 'b': 2, 'c': { 'a': 1, 'b': 2 } };\r\n *\r\n * omitDeep(object, ['b', 'a']);\r\n * // => { 'c': {} }\r\n */\r\nexport const omitDeep: OmitDeep = (object: any, ...paths: any) => {\r\n function omitDeepOnOwnProps(object: any) {\r\n if (!Array.isArray(object) && !lodash.isPlainObject(object)) {\r\n return object;\r\n }\r\n\r\n if (Array.isArray(object)) {\r\n return object.map((element) => (needOmit(element) ? omitDeep(element, ...paths) : element));\r\n }\r\n\r\n const temp = {};\r\n\r\n for (const [key, value] of Object.entries<{\r\n [x: string]: object | PropertyName;\r\n }>(object)) {\r\n (temp as any)[key] = needOmit(value) ? omitDeep(value, ...paths) : value;\r\n }\r\n return lodash.omit(temp, ...paths);\r\n }\r\n\r\n return omitDeepOnOwnProps(object);\r\n};\r\n"],"names":["needOmit","value","lodash","omitDeep","object","paths","omitDeepOnOwnProps","element","temp","key"],"mappings":";AAIO,MAAMA,IAAW,CAACC,MACvB,CAACC,EAAO,MAAMD,CAAK,MAAMC,EAAO,cAAcD,CAAK,KAAK,MAAM,QAAQA,CAAK,IAiChEE,IAAqB,CAACC,MAAgBC,MAAe;AAChE,WAASC,EAAmBF,GAAa;AACnC,QAAA,CAAC,MAAM,QAAQA,CAAM,KAAK,CAACF,EAAO,cAAcE,CAAM;AACjDA,aAAAA;AAGL,QAAA,MAAM,QAAQA,CAAM;AACtB,aAAOA,EAAO,IAAI,CAACG,MAAaP,EAASO,CAAO,IAAIJ,EAASI,GAAS,GAAGF,CAAK,IAAIE,CAAQ;AAG5F,UAAMC,IAAO,CAAC;AAEd,eAAW,CAACC,GAAKR,CAAK,KAAK,OAAO,QAE/BG,CAAM;AACN,MAAAI,EAAaC,CAAG,IAAIT,EAASC,CAAK,IAAIE,EAASF,GAAO,GAAGI,CAAK,IAAIJ;AAErE,WAAOC,EAAO,KAAKM,GAAM,GAAGH,CAAK;AAAA,EAAA;AAGnC,SAAOC,EAAmBF,CAAM;AAClC;"}
@@ -0,0 +1,18 @@
1
+ import e from "lodash";
2
+ const o = (s, n) => {
3
+ function y(r) {
4
+ if (!Array.isArray(r) && !e.isPlainObject(r))
5
+ return r;
6
+ if (Array.isArray(r))
7
+ return r.map((i) => o(i, n));
8
+ const t = {};
9
+ for (const [i, a] of Object.entries(r))
10
+ t[i] = o(a, n);
11
+ return e.omitBy(t, n);
12
+ }
13
+ return y(s);
14
+ };
15
+ export {
16
+ o as omitDeepBy
17
+ };
18
+ //# sourceMappingURL=omitDeepBy.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omitDeepBy.mjs","sources":["../../../src/omitDeepBy/omitDeepBy.ts"],"sourcesContent":["import type {\r\n Dictionary,\r\n NumericDictionary,\r\n PartialObject,\r\n PropertyName,\r\n ValueKeyIteratee\r\n} from 'lodash';\r\n\r\nimport lodash from 'lodash';\r\n\r\ninterface OmitDeepBy {\r\n <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;\r\n <T>(\r\n object: NumericDictionary<T> | null | undefined,\r\n predicate?: ValueKeyIteratee<T>\r\n ): NumericDictionary<T>;\r\n <T extends object>(\r\n object: T | null | undefined,\r\n predicate: ValueKeyIteratee<T[keyof T]>\r\n ): PartialObject<T>;\r\n}\r\n\r\n/**\r\n * The opposite of `_.pickBy`; this method creates an object composed of the\r\n * own and inherited enumerable properties of `object` that `predicate`\r\n * doesn't return truthy for.\r\n *\r\n * @category Function\r\n * @param object The source object.\r\n * @param [predicate] The function invoked per property.\r\n * @returns Returns the new object.\r\n * @example\r\n *\r\n * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };\r\n *\r\n * omitByDeep(object, _.isNil);\r\n * // => { 'a': 1, 'c': { 'a': 1 } }\r\n */\r\nexport const omitDeepBy: OmitDeepBy = (object: any, cb: any) => {\r\n function omitByDeepByOnOwnProps(object: any) {\r\n if (!Array.isArray(object) && !lodash.isPlainObject(object)) {\r\n return object;\r\n }\r\n\r\n if (Array.isArray(object)) {\r\n return object.map((element) => omitDeepBy(element, cb));\r\n }\r\n\r\n const temp = {};\r\n\r\n for (const [key, value] of Object.entries<{\r\n [x: string]: object | PropertyName;\r\n }>(object)) {\r\n (temp as any)[key] = omitDeepBy(value, cb);\r\n }\r\n return lodash.omitBy(temp, cb);\r\n }\r\n\r\n return omitByDeepByOnOwnProps(object);\r\n};\r\n"],"names":["omitDeepBy","object","cb","omitByDeepByOnOwnProps","lodash","element","temp","key","value"],"mappings":";AAsCa,MAAAA,IAAyB,CAACC,GAAaC,MAAY;AAC9D,WAASC,EAAuBF,GAAa;AACvC,QAAA,CAAC,MAAM,QAAQA,CAAM,KAAK,CAACG,EAAO,cAAcH,CAAM;AACjDA,aAAAA;AAGL,QAAA,MAAM,QAAQA,CAAM;AACtB,aAAOA,EAAO,IAAI,CAACI,MAAYL,EAAWK,GAASH,CAAE,CAAC;AAGxD,UAAMI,IAAO,CAAC;AAEd,eAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAE/BP,CAAM;AACN,MAAAK,EAAaC,CAAG,IAAIP,EAAWQ,GAAON,CAAE;AAEpC,WAAAE,EAAO,OAAOE,GAAMJ,CAAE;AAAA,EAAA;AAG/B,SAAOC,EAAuBF,CAAM;AACtC;"}
@@ -0,0 +1,2 @@
1
+ export { omitDeep } from './omitDeep/omitDeep';
2
+ export { omitDeepBy } from './omitDeepBy/omitDeepBy';
@@ -0,0 +1,25 @@
1
+ import { Many, PartialObject, PropertyName } from 'lodash';
2
+ export declare const needOmit: (value: any) => boolean;
3
+ interface OmitDeep {
4
+ <T extends object, K extends PropertyName[]>(object: T | null | undefined, ...paths: K): Pick<T, Exclude<keyof T, K[number]>>;
5
+ <T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Many<K>[]): Omit<T, K>;
6
+ <T extends object>(object: T | null | undefined, ...paths: Many<PropertyName>[]): PartialObject<T>;
7
+ }
8
+ /**
9
+ * The opposite of `_.pick`; this method creates an object composed of the
10
+ * own and inherited enumerable properties of `object` that are not omitted.
11
+ *
12
+ * @category Function
13
+ * @param object The source object.
14
+ * @param [paths] The property names to omit, specified
15
+ * individually or in arrays.
16
+ * @returns Returns the new object.
17
+ * @example
18
+ *
19
+ * const object = { 'a': 1, 'b': 2, 'c': { 'a': 1, 'b': 2 } };
20
+ *
21
+ * omitDeep(object, ['b', 'a']);
22
+ * // => { 'c': {} }
23
+ */
24
+ export declare const omitDeep: OmitDeep;
25
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { Dictionary, NumericDictionary, PartialObject, ValueKeyIteratee } from 'lodash';
2
+ interface OmitDeepBy {
3
+ <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
4
+ <T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
5
+ <T extends object>(object: T | null | undefined, predicate: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
6
+ }
7
+ /**
8
+ * The opposite of `_.pickBy`; this method creates an object composed of the
9
+ * own and inherited enumerable properties of `object` that `predicate`
10
+ * doesn't return truthy for.
11
+ *
12
+ * @category Function
13
+ * @param object The source object.
14
+ * @param [predicate] The function invoked per property.
15
+ * @returns Returns the new object.
16
+ * @example
17
+ *
18
+ * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };
19
+ *
20
+ * omitByDeep(object, _.isNil);
21
+ * // => { 'a': 1, 'c': { 'a': 1 } }
22
+ */
23
+ export declare const omitDeepBy: OmitDeepBy;
24
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lodash-omitdeep",
3
3
  "type": "module",
4
- "version": "1.6.0",
4
+ "version": "1.6.1",
5
5
  "description": "lodash omitDeep/omitByDeep object key/value recursively",
6
6
  "author": {
7
7
  "name": "SIBERIA CAN CODE 🧊",
@@ -39,9 +39,10 @@
39
39
  "module": "dist/esm/index.mjs",
40
40
  "types": "dist/types/index.d.ts",
41
41
  "files": [
42
- "dist/**/*"
42
+ "dist"
43
43
  ],
44
44
  "scripts": {
45
+ "prepublishOnly": "yarn unit-test run && yarn build",
45
46
  "build": "shx rm -rf dist && vite build",
46
47
  "lint": "eslint . --fix",
47
48
  "type": "tsc --noEmit",