lodash-omitdeep 1.4.1 → 1.5.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.
Files changed (33) hide show
  1. package/dist/cjs/index.cjs +7 -0
  2. package/dist/cjs/index.cjs.map +1 -0
  3. package/dist/cjs/omitDeep/omitDeep.cjs +19 -0
  4. package/dist/{esm/omitDeep/omitDeep.js.map → cjs/omitDeep/omitDeep.cjs.map} +1 -1
  5. package/dist/cjs/omitDeepBy/omitDeepBy.cjs +18 -0
  6. package/dist/cjs/omitDeepBy/omitDeepBy.cjs.map +1 -0
  7. package/dist/esm/index.mjs +7 -0
  8. package/dist/esm/index.mjs.map +1 -0
  9. package/dist/esm/omitDeep/omitDeep.mjs +19 -0
  10. package/dist/{cjs/omitDeep/omitDeep.js.map → esm/omitDeep/omitDeep.mjs.map} +1 -1
  11. package/dist/esm/omitDeepBy/omitDeepBy.mjs +18 -0
  12. package/dist/esm/omitDeepBy/omitDeepBy.mjs.map +1 -0
  13. package/dist/types/index.d.ts +2 -0
  14. package/dist/types/omitDeep/omitDeep.d.ts +25 -0
  15. package/dist/types/omitDeep/omitDeep.test.d.ts +1 -0
  16. package/dist/types/omitDeepBy/omitDeepBy.d.ts +24 -0
  17. package/dist/types/omitDeepBy/omitDeepBy.test.d.ts +1 -0
  18. package/package.json +22 -34
  19. package/dist/cjs/_rollupPluginBabelHelpers-DUvUfWrK.js +0 -3
  20. package/dist/cjs/_rollupPluginBabelHelpers-DUvUfWrK.js.map +0 -1
  21. package/dist/cjs/index.js +0 -3
  22. package/dist/cjs/index.js.map +0 -1
  23. package/dist/cjs/omitDeep/omitDeep.js +0 -3
  24. package/dist/cjs/omitDeepBy/omitDeepBy.js +0 -3
  25. package/dist/cjs/omitDeepBy/omitDeepBy.js.map +0 -1
  26. package/dist/esm/_rollupPluginBabelHelpers-CrGLvWoI.js +0 -3
  27. package/dist/esm/_rollupPluginBabelHelpers-CrGLvWoI.js.map +0 -1
  28. package/dist/esm/index.js +0 -3
  29. package/dist/esm/index.js.map +0 -1
  30. package/dist/esm/omitDeep/omitDeep.js +0 -3
  31. package/dist/esm/omitDeepBy/omitDeepBy.js +0 -3
  32. package/dist/esm/omitDeepBy/omitDeepBy.js.map +0 -1
  33. package/dist/index.d.ts +0 -49
@@ -0,0 +1,7 @@
1
+ import { omitDeep as m } from "./omitDeep/omitDeep.cjs";
2
+ import { omitDeepBy as r } from "./omitDeepBy/omitDeepBy.cjs";
3
+ export {
4
+ m as omitDeep,
5
+ r as omitDeepBy
6
+ };
7
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,19 @@
1
+ import { isPlainObject as m, omit as a, isNil as e } from "lodash";
2
+ const y = (i) => !e(i) && (m(i) || Array.isArray(i)), f = (i, ...t) => {
3
+ function A(r) {
4
+ if (!Array.isArray(r) && !m(r))
5
+ return r;
6
+ if (Array.isArray(r))
7
+ return r.map((n) => y(n) ? f(n, ...t) : n);
8
+ const s = {};
9
+ for (const [n, o] of Object.entries(r))
10
+ s[n] = y(o) ? f(o, ...t) : o;
11
+ return a(s, ...t);
12
+ }
13
+ return A(i);
14
+ };
15
+ export {
16
+ y as needOmit,
17
+ f as omitDeep
18
+ };
19
+ //# sourceMappingURL=omitDeep.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"omitDeep.js","sources":["../../../src/omitDeep/omitDeep.ts"],"sourcesContent":["import type { Many, PartialObject, PropertyName } from 'lodash';\n\nimport isNil from 'lodash.isnil';\nimport isPlainObject from 'lodash.isplainobject';\nimport omit from 'lodash.omit';\n\nexport const needOmit = (value: any) =>\n !isNil(value) && (isPlainObject(value) || Array.isArray(value));\n\ninterface OmitDeep {\n <T extends object, K extends PropertyName[]>(\n object: T | null | undefined,\n ...paths: K\n ): Pick<T, Exclude<keyof T, K[number]>>;\n <T extends object, K extends keyof T>(\n object: T | null | undefined,\n ...paths: Many<K>[]\n ): Omit<T, K>;\n <T extends object>(\n object: T | null | undefined,\n ...paths: Many<PropertyName>[]\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that are not omitted.\n *\n * @category Function\n * @param object The source object.\n * @param [paths] The property names to omit, specified\n * individually or in arrays.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': 2, 'c': { 'a': 1, 'b': 2 } };\n *\n * omitDeep(object, ['b', 'a']);\n * // => { 'c': {} }\n */\nexport const omitDeep: OmitDeep = (object: any, ...paths: any) => {\n function omitDeepOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => (needOmit(element) ? omitDeep(element, ...paths) : element));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = needOmit(value) ? omitDeep(value, ...paths) : value;\n }\n return omit(temp, ...paths);\n }\n\n return omitDeepOnOwnProps(object);\n};\n"],"names":["needOmit","value","isNil","isPlainObject","Array","isArray","omitDeep","object","_len","arguments","length","paths","_key","map","element","apply","concat","temp","_i","_Object$entries","Object","entries","_Object$entries$_i","_slicedToArray","key","omit","omitDeepOnOwnProps"],"mappings":";4JAMaA,EAAW,SAACC,GAAU,OAChCC,EAAMD,KAAWE,EAAcF,IAAUG,MAAMC,QAAQJ,GAAO,EAiCpDK,EAAqB,SAACC,GAA+B,IAAAC,IAAAA,EAAAC,UAAAC,OAAfC,MAAKP,MAAAI,EAAAA,EAAAA,OAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAALD,EAAKC,EAAAH,GAAAA,UAAAG,GAoBtD,OAnBA,SAA4BL,GAC1B,IAAKH,MAAMC,QAAQE,KAAYJ,EAAcI,GAC3C,OAAOA,EAGT,GAAIH,MAAMC,QAAQE,GAChB,OAAOA,EAAOM,KAAI,SAACC,GAAO,OAAMd,EAASc,GAAWR,EAAQS,WAACD,EAAAA,CAAAA,GAAOE,OAAKL,IAASG,CAAO,IAK3F,IAFA,IAAMG,EAAO,CAAE,EAEfC,EAAAC,EAAAA,EAA2BC,OAAOC,QAE/Bd,GAAOW,EAAAC,EAAAT,OAAAQ,IAAE,CAFP,IAAAI,EAAAC,EAAAJ,EAAAD,GAAA,GAAOM,EAAGF,EAAA,GAAErB,EAAKqB,EAAA,GAGnBL,EAAaO,GAAOxB,EAASC,GAASK,EAAQS,WAAA,EAAA,CAACd,GAAKe,OAAKL,IAASV,CACrE,CACA,OAAOwB,EAAIV,WAAA,EAAA,CAACE,GAAID,OAAKL,GACvB,CAEOe,CAAmBnB,EAC5B"}
1
+ {"version":3,"file":"omitDeep.cjs","sources":["../../../src/omitDeep/omitDeep.ts"],"sourcesContent":["import type { Many, PartialObject, PropertyName } from 'lodash';\n\nimport { isNil, isPlainObject, omit } from 'lodash';\n\nexport const needOmit = (value: any) =>\n !isNil(value) && (isPlainObject(value) || Array.isArray(value));\n\ninterface OmitDeep {\n <T extends object, K extends PropertyName[]>(\n object: T | null | undefined,\n ...paths: K\n ): Pick<T, Exclude<keyof T, K[number]>>;\n <T extends object, K extends keyof T>(\n object: T | null | undefined,\n ...paths: Many<K>[]\n ): Omit<T, K>;\n <T extends object>(\n object: T | null | undefined,\n ...paths: Many<PropertyName>[]\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that are not omitted.\n *\n * @category Function\n * @param object The source object.\n * @param [paths] The property names to omit, specified\n * individually or in arrays.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': 2, 'c': { 'a': 1, 'b': 2 } };\n *\n * omitDeep(object, ['b', 'a']);\n * // => { 'c': {} }\n */\nexport const omitDeep: OmitDeep = (object: any, ...paths: any) => {\n function omitDeepOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => (needOmit(element) ? omitDeep(element, ...paths) : element));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = needOmit(value) ? omitDeep(value, ...paths) : value;\n }\n return omit(temp, ...paths);\n }\n\n return omitDeepOnOwnProps(object);\n};\n"],"names":["needOmit","value","isNil","isPlainObject","omitDeep","object","paths","omitDeepOnOwnProps","element","temp","key","omit"],"mappings":";AAIO,MAAMA,IAAW,CAACC,MACvB,CAACC,EAAMD,CAAK,MAAME,EAAcF,CAAK,KAAK,MAAM,QAAQA,CAAK,IAiClDG,IAAqB,CAACC,MAAgBC,MAAe;AAChE,WAASC,EAAmBF,GAAa;AACnC,QAAA,CAAC,MAAM,QAAQA,CAAM,KAAK,CAACF,EAAcE,CAAM;AAC1CA,aAAAA;AAGL,QAAA,MAAM,QAAQA,CAAM;AACtB,aAAOA,EAAO,IAAI,CAACG,MAAaR,EAASQ,CAAO,IAAIJ,EAASI,GAAS,GAAGF,CAAK,IAAIE,CAAQ;AAG5F,UAAMC,IAAO,CAAC;AAEd,eAAW,CAACC,GAAKT,CAAK,KAAK,OAAO,QAE/BI,CAAM;AACN,MAAAI,EAAaC,CAAG,IAAIV,EAASC,CAAK,IAAIG,EAASH,GAAO,GAAGK,CAAK,IAAIL;AAE9D,WAAAU,EAAKF,GAAM,GAAGH,CAAK;AAAA,EAAA;AAG5B,SAAOC,EAAmBF,CAAM;AAClC;"}
@@ -0,0 +1,18 @@
1
+ import { isPlainObject as a, omitBy as m } from "lodash";
2
+ const e = (y, n) => {
3
+ function o(r) {
4
+ if (!Array.isArray(r) && !a(r))
5
+ return r;
6
+ if (Array.isArray(r))
7
+ return r.map((i) => e(i, n));
8
+ const t = {};
9
+ for (const [i, s] of Object.entries(r))
10
+ t[i] = e(s, n);
11
+ return m(t, n);
12
+ }
13
+ return o(y);
14
+ };
15
+ export {
16
+ e as omitDeepBy
17
+ };
18
+ //# sourceMappingURL=omitDeepBy.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omitDeepBy.cjs","sources":["../../../src/omitDeepBy/omitDeepBy.ts"],"sourcesContent":["import type {\n Dictionary,\n NumericDictionary,\n PartialObject,\n PropertyName,\n ValueKeyIteratee\n} from 'lodash';\n\nimport { isPlainObject, omitBy } from 'lodash';\n\ninterface OmitDeepBy {\n <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;\n <T>(\n object: NumericDictionary<T> | null | undefined,\n predicate?: ValueKeyIteratee<T>\n ): NumericDictionary<T>;\n <T extends object>(\n object: T | null | undefined,\n predicate: ValueKeyIteratee<T[keyof T]>\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pickBy`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that `predicate`\n * doesn't return truthy for.\n *\n * @category Function\n * @param object The source object.\n * @param [predicate] The function invoked per property.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };\n *\n * omitByDeep(object, _.isNil);\n * // => { 'a': 1, 'c': { 'a': 1 } }\n */\nexport const omitDeepBy: OmitDeepBy = (object: any, cb: any) => {\n function omitByDeepByOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => omitDeepBy(element, cb));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = omitDeepBy(value, cb);\n }\n return omitBy(temp, cb);\n }\n\n return omitByDeepByOnOwnProps(object);\n};\n"],"names":["omitDeepBy","object","cb","omitByDeepByOnOwnProps","isPlainObject","element","temp","key","value","omitBy"],"mappings":";AAsCa,MAAAA,IAAyB,CAACC,GAAaC,MAAY;AAC9D,WAASC,EAAuBF,GAAa;AACvC,QAAA,CAAC,MAAM,QAAQA,CAAM,KAAK,CAACG,EAAcH,CAAM;AAC1CA,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,WAAAO,EAAOH,GAAMJ,CAAE;AAAA,EAAA;AAGxB,SAAOC,EAAuBF,CAAM;AACtC;"}
@@ -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 { isPlainObject as m, omit as a, isNil as e } from "lodash";
2
+ const y = (i) => !e(i) && (m(i) || Array.isArray(i)), f = (i, ...t) => {
3
+ function A(r) {
4
+ if (!Array.isArray(r) && !m(r))
5
+ return r;
6
+ if (Array.isArray(r))
7
+ return r.map((n) => y(n) ? f(n, ...t) : n);
8
+ const s = {};
9
+ for (const [n, o] of Object.entries(r))
10
+ s[n] = y(o) ? f(o, ...t) : o;
11
+ return a(s, ...t);
12
+ }
13
+ return A(i);
14
+ };
15
+ export {
16
+ y as needOmit,
17
+ f as omitDeep
18
+ };
19
+ //# sourceMappingURL=omitDeep.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"omitDeep.js","sources":["../../../src/omitDeep/omitDeep.ts"],"sourcesContent":["import type { Many, PartialObject, PropertyName } from 'lodash';\n\nimport isNil from 'lodash.isnil';\nimport isPlainObject from 'lodash.isplainobject';\nimport omit from 'lodash.omit';\n\nexport const needOmit = (value: any) =>\n !isNil(value) && (isPlainObject(value) || Array.isArray(value));\n\ninterface OmitDeep {\n <T extends object, K extends PropertyName[]>(\n object: T | null | undefined,\n ...paths: K\n ): Pick<T, Exclude<keyof T, K[number]>>;\n <T extends object, K extends keyof T>(\n object: T | null | undefined,\n ...paths: Many<K>[]\n ): Omit<T, K>;\n <T extends object>(\n object: T | null | undefined,\n ...paths: Many<PropertyName>[]\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that are not omitted.\n *\n * @category Function\n * @param object The source object.\n * @param [paths] The property names to omit, specified\n * individually or in arrays.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': 2, 'c': { 'a': 1, 'b': 2 } };\n *\n * omitDeep(object, ['b', 'a']);\n * // => { 'c': {} }\n */\nexport const omitDeep: OmitDeep = (object: any, ...paths: any) => {\n function omitDeepOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => (needOmit(element) ? omitDeep(element, ...paths) : element));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = needOmit(value) ? omitDeep(value, ...paths) : value;\n }\n return omit(temp, ...paths);\n }\n\n return omitDeepOnOwnProps(object);\n};\n"],"names":["needOmit","value","isNil","isPlainObject","Array","isArray","omitDeep","object","_len","arguments","length","paths","_key","map","element","apply","concat","temp","_i","_Object$entries","Object","entries","_Object$entries$_i","_slicedToArray","key","omit","omitDeepOnOwnProps"],"mappings":";4JAMaA,EAAW,SAACC,GAAU,OAChCC,EAAMD,KAAWE,EAAcF,IAAUG,MAAMC,QAAQJ,GAAO,EAiCpDK,EAAqB,SAACC,GAA+B,IAAAC,IAAAA,EAAAC,UAAAC,OAAfC,MAAKP,MAAAI,EAAAA,EAAAA,OAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAALD,EAAKC,EAAAH,GAAAA,UAAAG,GAoBtD,OAnBA,SAA4BL,GAC1B,IAAKH,MAAMC,QAAQE,KAAYJ,EAAcI,GAC3C,OAAOA,EAGT,GAAIH,MAAMC,QAAQE,GAChB,OAAOA,EAAOM,KAAI,SAACC,GAAO,OAAMd,EAASc,GAAWR,EAAQS,WAACD,EAAAA,CAAAA,GAAOE,OAAKL,IAASG,CAAO,IAK3F,IAFA,IAAMG,EAAO,CAAE,EAEfC,EAAAC,EAAAA,EAA2BC,OAAOC,QAE/Bd,GAAOW,EAAAC,EAAAT,OAAAQ,IAAE,CAFP,IAAAI,EAAAC,EAAAA,eAAAJ,EAAAD,GAAA,GAAOM,EAAGF,EAAA,GAAErB,EAAKqB,EAAA,GAGnBL,EAAaO,GAAOxB,EAASC,GAASK,EAAQS,WAAA,EAAA,CAACd,GAAKe,OAAKL,IAASV,CACrE,CACA,OAAOwB,EAAIV,WAAA,EAAA,CAACE,GAAID,OAAKL,GACvB,CAEOe,CAAmBnB,EAC5B"}
1
+ {"version":3,"file":"omitDeep.mjs","sources":["../../../src/omitDeep/omitDeep.ts"],"sourcesContent":["import type { Many, PartialObject, PropertyName } from 'lodash';\n\nimport { isNil, isPlainObject, omit } from 'lodash';\n\nexport const needOmit = (value: any) =>\n !isNil(value) && (isPlainObject(value) || Array.isArray(value));\n\ninterface OmitDeep {\n <T extends object, K extends PropertyName[]>(\n object: T | null | undefined,\n ...paths: K\n ): Pick<T, Exclude<keyof T, K[number]>>;\n <T extends object, K extends keyof T>(\n object: T | null | undefined,\n ...paths: Many<K>[]\n ): Omit<T, K>;\n <T extends object>(\n object: T | null | undefined,\n ...paths: Many<PropertyName>[]\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that are not omitted.\n *\n * @category Function\n * @param object The source object.\n * @param [paths] The property names to omit, specified\n * individually or in arrays.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': 2, 'c': { 'a': 1, 'b': 2 } };\n *\n * omitDeep(object, ['b', 'a']);\n * // => { 'c': {} }\n */\nexport const omitDeep: OmitDeep = (object: any, ...paths: any) => {\n function omitDeepOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => (needOmit(element) ? omitDeep(element, ...paths) : element));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = needOmit(value) ? omitDeep(value, ...paths) : value;\n }\n return omit(temp, ...paths);\n }\n\n return omitDeepOnOwnProps(object);\n};\n"],"names":["needOmit","value","isNil","isPlainObject","omitDeep","object","paths","omitDeepOnOwnProps","element","temp","key","omit"],"mappings":";AAIO,MAAMA,IAAW,CAACC,MACvB,CAACC,EAAMD,CAAK,MAAME,EAAcF,CAAK,KAAK,MAAM,QAAQA,CAAK,IAiClDG,IAAqB,CAACC,MAAgBC,MAAe;AAChE,WAASC,EAAmBF,GAAa;AACnC,QAAA,CAAC,MAAM,QAAQA,CAAM,KAAK,CAACF,EAAcE,CAAM;AAC1CA,aAAAA;AAGL,QAAA,MAAM,QAAQA,CAAM;AACtB,aAAOA,EAAO,IAAI,CAACG,MAAaR,EAASQ,CAAO,IAAIJ,EAASI,GAAS,GAAGF,CAAK,IAAIE,CAAQ;AAG5F,UAAMC,IAAO,CAAC;AAEd,eAAW,CAACC,GAAKT,CAAK,KAAK,OAAO,QAE/BI,CAAM;AACN,MAAAI,EAAaC,CAAG,IAAIV,EAASC,CAAK,IAAIG,EAASH,GAAO,GAAGK,CAAK,IAAIL;AAE9D,WAAAU,EAAKF,GAAM,GAAGH,CAAK;AAAA,EAAA;AAG5B,SAAOC,EAAmBF,CAAM;AAClC;"}
@@ -0,0 +1,18 @@
1
+ import { isPlainObject as a, omitBy as m } from "lodash";
2
+ const e = (y, n) => {
3
+ function o(r) {
4
+ if (!Array.isArray(r) && !a(r))
5
+ return r;
6
+ if (Array.isArray(r))
7
+ return r.map((i) => e(i, n));
8
+ const t = {};
9
+ for (const [i, s] of Object.entries(r))
10
+ t[i] = e(s, n);
11
+ return m(t, n);
12
+ }
13
+ return o(y);
14
+ };
15
+ export {
16
+ e 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 {\n Dictionary,\n NumericDictionary,\n PartialObject,\n PropertyName,\n ValueKeyIteratee\n} from 'lodash';\n\nimport { isPlainObject, omitBy } from 'lodash';\n\ninterface OmitDeepBy {\n <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;\n <T>(\n object: NumericDictionary<T> | null | undefined,\n predicate?: ValueKeyIteratee<T>\n ): NumericDictionary<T>;\n <T extends object>(\n object: T | null | undefined,\n predicate: ValueKeyIteratee<T[keyof T]>\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pickBy`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that `predicate`\n * doesn't return truthy for.\n *\n * @category Function\n * @param object The source object.\n * @param [predicate] The function invoked per property.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };\n *\n * omitByDeep(object, _.isNil);\n * // => { 'a': 1, 'c': { 'a': 1 } }\n */\nexport const omitDeepBy: OmitDeepBy = (object: any, cb: any) => {\n function omitByDeepByOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => omitDeepBy(element, cb));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = omitDeepBy(value, cb);\n }\n return omitBy(temp, cb);\n }\n\n return omitByDeepByOnOwnProps(object);\n};\n"],"names":["omitDeepBy","object","cb","omitByDeepByOnOwnProps","isPlainObject","element","temp","key","value","omitBy"],"mappings":";AAsCa,MAAAA,IAAyB,CAACC,GAAaC,MAAY;AAC9D,WAASC,EAAuBF,GAAa;AACvC,QAAA,CAAC,MAAM,QAAQA,CAAM,KAAK,CAACG,EAAcH,CAAM;AAC1CA,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,WAAAO,EAAOH,GAAMJ,CAAE;AAAA,EAAA;AAGxB,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,22 +1,17 @@
1
1
  {
2
2
  "name": "lodash-omitdeep",
3
- "version": "1.4.1",
3
+ "type": "module",
4
+ "version": "1.5.1",
4
5
  "description": "lodash omitDeep/omitByDeep object key/value recursively",
5
6
  "author": {
6
7
  "name": "SIBERIA CAN CODE 🧊",
7
8
  "url": "https://github.com/siberiacancode"
8
9
  },
9
- "contributors": [
10
- {
11
- "name": "Dmitry Babin",
12
- "url": "https://github.com/debabin"
13
- }
14
- ],
15
10
  "license": "MIT",
16
11
  "homepage": "https://github.com/siberiacancode/lodash-omitdeep",
17
12
  "repository": {
18
13
  "type": "git",
19
- "url": "https://github.com/siberiacancode/lodash-omitdeep"
14
+ "url": "git+https://github.com/siberiacancode/lodash-omitdeep.git"
20
15
  },
21
16
  "bugs": {
22
17
  "url": "https://github.com/siberiacancode/lodash-omitdeep/issues"
@@ -36,18 +31,18 @@
36
31
  ],
37
32
  "sideEffects": false,
38
33
  "exports": {
39
- "types": "./dist/index.d.ts",
40
- "import": "./dist/esm/index.js",
41
- "require": "./dist/cjs/index.js"
34
+ "types": "./dist/types/index.d.ts",
35
+ "import": "./dist/esm/index.mjs",
36
+ "require": "./dist/cjs/index.cjs"
42
37
  },
43
- "main": "dist/cjs/index.js",
44
- "module": "dist/esm/index.js",
45
- "types": "dist/index.d.ts",
38
+ "main": "dist/cjs/index.mjs",
39
+ "module": "dist/esm/index.mjs",
40
+ "types": "dist/types/index.d.ts",
46
41
  "files": [
47
42
  "dist/**/*"
48
43
  ],
49
44
  "scripts": {
50
- "build": "shx rm -rf dist && rollup -c --bundleConfigAsCjs",
45
+ "build": "shx rm -rf dist && vite build",
51
46
  "lint": "eslint . --fix",
52
47
  "type": "tsc --noEmit",
53
48
  "format": "prettier --write .",
@@ -56,30 +51,23 @@
56
51
  "unit-test": "vitest"
57
52
  },
58
53
  "peerDependencies": {
59
- "lodash.isnil": "^4.0.0",
60
- "lodash.isplainobject": "^4.0.6",
61
- "lodash.omit": "^4.5.0",
62
- "lodash.omitby": "^4.6.0"
54
+ "lodash": "^4.17.21"
63
55
  },
64
56
  "dependencies": {
65
- "lodash.isnil": "^4.0.0",
66
- "lodash.isplainobject": "^4.0.6",
67
- "lodash.omit": "^4.5.0",
68
- "lodash.omitby": "^4.6.0"
57
+ "lodash": "^4.17.21"
69
58
  },
70
59
  "devDependencies": {
71
- "@siberiacancode/builder": "^1.3.17",
72
- "@siberiacancode/eslint": "^2.8.0",
73
- "@siberiacancode/prettier": "^1.2.0",
74
- "@siberiacancode/vitest": "^1.2.4",
75
- "@types/lodash.isnil": "^4.0.9",
76
- "@types/lodash.isplainobject": "^4.0.9",
77
- "@types/lodash.omit": "^4.5.9",
78
- "@types/lodash.omitby": "^4.6.9",
60
+ "@siberiacancode/eslint": "^2.9.0",
61
+ "@siberiacancode/prettier": "^1.3.0",
62
+ "@siberiacancode/vitest": "^2.1.0",
63
+ "@types/lodash": "^4.17.16",
64
+ "@types/node": "^22.13.13",
79
65
  "husky": "^9.1.7",
80
- "lint-staged": "^15.4.3",
81
- "shx": "^0.3.4",
82
- "typescript": "^5.7.3"
66
+ "lint-staged": "^15.5.0",
67
+ "shx": "^0.4.0",
68
+ "typescript": "^5.8.2",
69
+ "vite": "^6.2.3",
70
+ "vite-plugin-dts": "^4.5.3"
83
71
  },
84
72
  "lint-staged": {
85
73
  "*.js": [
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- "use strict";function r(r,t){(null==t||t>r.length)&&(t=r.length);for(var n=0,e=Array(t);n<t;n++)e[n]=r[n];return e}exports._slicedToArray=function(t,n){return function(r){if(Array.isArray(r))return r}(t)||function(r,t){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var e,o,l,a,i=[],u=!0,c=!1;try{if(l=(n=n.call(r)).next,0===t);else for(;!(u=(e=l.call(n)).done)&&(i.push(e.value),i.length!==t);u=!0);}catch(r){c=!0,o=r}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(t,n)||function(t,n){if(t){if("string"==typeof t)return r(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()};
3
- //# sourceMappingURL=_rollupPluginBabelHelpers-DUvUfWrK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-DUvUfWrK.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/cjs/index.js DELETED
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- "use strict";var e=require("./omitDeep/omitDeep.js"),i=require("./omitDeepBy/omitDeepBy.js");require("./_rollupPluginBabelHelpers-DUvUfWrK.js"),require("lodash.isnil"),require("lodash.isplainobject"),require("lodash.omit"),require("lodash.omitby"),exports.omitDeep=e.omitDeep,exports.omitDeepBy=i.omitDeepBy;
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- "use strict";var r=require("../_rollupPluginBabelHelpers-DUvUfWrK.js"),e=require("lodash.isnil"),i=require("lodash.isplainobject"),n=require("lodash.omit"),t=function(r){return!e(r)&&(i(r)||Array.isArray(r))},a=function(e){for(var o=arguments.length,u=new Array(o>1?o-1:0),l=1;l<o;l++)u[l-1]=arguments[l];return function(e){if(!Array.isArray(e)&&!i(e))return e;if(Array.isArray(e))return e.map((function(r){return t(r)?a.apply(void 0,[r].concat(u)):r}));for(var o={},l=0,s=Object.entries(e);l<s.length;l++){var c=r._slicedToArray(s[l],2),p=c[0],y=c[1];o[p]=t(y)?a.apply(void 0,[y].concat(u)):y}return n.apply(void 0,[o].concat(u))}(e)};exports.needOmit=t,exports.omitDeep=a;
3
- //# sourceMappingURL=omitDeep.js.map
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- "use strict";var r=require("../_rollupPluginBabelHelpers-DUvUfWrK.js"),e=require("lodash.isplainobject"),i=require("lodash.omitby"),t=function(n,u){return function(n){if(!Array.isArray(n)&&!e(n))return n;if(Array.isArray(n))return n.map((function(r){return t(r,u)}));for(var a={},o=0,s=Object.entries(n);o<s.length;o++){var l=r._slicedToArray(s[o],2),c=l[0],y=l[1];a[c]=t(y,u)}return i(a,u)}(n)};exports.omitDeepBy=t;
3
- //# sourceMappingURL=omitDeepBy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"omitDeepBy.js","sources":["../../../src/omitDeepBy/omitDeepBy.ts"],"sourcesContent":["import type {\n Dictionary,\n NumericDictionary,\n PartialObject,\n PropertyName,\n ValueKeyIteratee\n} from 'lodash';\n\nimport isPlainObject from 'lodash.isplainobject';\nimport omitBy from 'lodash.omitby';\n\ninterface OmitDeepBy {\n <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;\n <T>(\n object: NumericDictionary<T> | null | undefined,\n predicate?: ValueKeyIteratee<T>\n ): NumericDictionary<T>;\n <T extends object>(\n object: T | null | undefined,\n predicate: ValueKeyIteratee<T[keyof T]>\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pickBy`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that `predicate`\n * doesn't return truthy for.\n *\n * @category Function\n * @param object The source object.\n * @param [predicate] The function invoked per property.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };\n *\n * omitByDeep(object, _.isNil);\n * // => { 'a': 1, 'c': { 'a': 1 } }\n */\nexport const omitDeepBy: OmitDeepBy = (object: any, cb: any) => {\n function omitByDeepByOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => omitDeepBy(element, cb));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = omitDeepBy(value, cb);\n }\n return omitBy(temp, cb);\n }\n\n return omitByDeepByOnOwnProps(object);\n};\n"],"names":["omitDeepBy","object","cb","Array","isArray","isPlainObject","map","element","temp","_i","_Object$entries","Object","entries","length","_Object$entries$_i","_slicedToArray","key","value","omitBy","omitByDeepByOnOwnProps"],"mappings":";oIAuCaA,EAAyB,SAACC,EAAaC,GAoBlD,OAnBA,SAAgCD,GAC9B,IAAKE,MAAMC,QAAQH,KAAYI,EAAcJ,GAC3C,OAAOA,EAGT,GAAIE,MAAMC,QAAQH,GAChB,OAAOA,EAAOK,KAAI,SAACC,GAAO,OAAKP,EAAWO,EAASL,MAKrD,IAFA,IAAMM,EAAO,CAAE,EAEfC,EAAAC,EAAAA,EAA2BC,OAAOC,QAE/BX,GAAOQ,EAAAC,EAAAG,OAAAJ,IAAE,CAFP,IAAAK,EAAAC,EAAAA,eAAAL,EAAAD,GAAA,GAAOO,EAAGF,EAAA,GAAEG,EAAKH,EAAA,GAGnBN,EAAaQ,GAAOhB,EAAWiB,EAAOf,EACzC,CACA,OAAOgB,EAAOV,EAAMN,EACtB,CAEOiB,CAAuBlB,EAChC"}
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- function r(r,t){(null==t||t>r.length)&&(t=r.length);for(var n=0,e=Array(t);n<t;n++)e[n]=r[n];return e}function t(t,n){return function(r){if(Array.isArray(r))return r}(t)||function(r,t){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var e,o,l,a,i=[],u=!0,c=!1;try{if(l=(n=n.call(r)).next,0===t);else for(;!(u=(e=l.call(n)).done)&&(i.push(e.value),i.length!==t);u=!0);}catch(r){c=!0,o=r}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(t,n)||function(t,n){if(t){if("string"==typeof t)return r(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}export{t as _};
3
- //# sourceMappingURL=_rollupPluginBabelHelpers-CrGLvWoI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-CrGLvWoI.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/esm/index.js DELETED
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- export{omitDeep}from"./omitDeep/omitDeep.js";export{omitDeepBy}from"./omitDeepBy/omitDeepBy.js";import"./_rollupPluginBabelHelpers-CrGLvWoI.js";import"lodash.isnil";import"lodash.isplainobject";import"lodash.omit";import"lodash.omitby";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- import{_ as r}from"../_rollupPluginBabelHelpers-CrGLvWoI.js";import o from"lodash.isnil";import a from"lodash.isplainobject";import t from"lodash.omit";var i=function(r){return!o(r)&&(a(r)||Array.isArray(r))},n=function(o){for(var e=arguments.length,p=new Array(e>1?e-1:0),l=1;l<e;l++)p[l-1]=arguments[l];return function(o){if(!Array.isArray(o)&&!a(o))return o;if(Array.isArray(o))return o.map((function(r){return i(r)?n.apply(void 0,[r].concat(p)):r}));for(var e={},l=0,s=Object.entries(o);l<s.length;l++){var c=r(s[l],2),f=c[0],u=c[1];e[f]=i(u)?n.apply(void 0,[u].concat(p)):u}return t.apply(void 0,[e].concat(p))}(o)};export{i as needOmit,n as omitDeep};
3
- //# sourceMappingURL=omitDeep.js.map
@@ -1,3 +0,0 @@
1
- /* @license lodash-omitdeep v1.4.1 */
2
- import{_ as r}from"../_rollupPluginBabelHelpers-CrGLvWoI.js";import t from"lodash.isplainobject";import o from"lodash.omitby";var e=function(i,n){return function(i){if(!Array.isArray(i)&&!t(i))return i;if(Array.isArray(i))return i.map((function(r){return e(r,n)}));for(var a={},s=0,u=Object.entries(i);s<u.length;s++){var f=r(u[s],2),l=f[0],m=f[1];a[l]=e(m,n)}return o(a,n)}(i)};export{e as omitDeepBy};
3
- //# sourceMappingURL=omitDeepBy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"omitDeepBy.js","sources":["../../../src/omitDeepBy/omitDeepBy.ts"],"sourcesContent":["import type {\n Dictionary,\n NumericDictionary,\n PartialObject,\n PropertyName,\n ValueKeyIteratee\n} from 'lodash';\n\nimport isPlainObject from 'lodash.isplainobject';\nimport omitBy from 'lodash.omitby';\n\ninterface OmitDeepBy {\n <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;\n <T>(\n object: NumericDictionary<T> | null | undefined,\n predicate?: ValueKeyIteratee<T>\n ): NumericDictionary<T>;\n <T extends object>(\n object: T | null | undefined,\n predicate: ValueKeyIteratee<T[keyof T]>\n ): PartialObject<T>;\n}\n\n/**\n * The opposite of `_.pickBy`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that `predicate`\n * doesn't return truthy for.\n *\n * @category Function\n * @param object The source object.\n * @param [predicate] The function invoked per property.\n * @returns Returns the new object.\n * @example\n *\n * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };\n *\n * omitByDeep(object, _.isNil);\n * // => { 'a': 1, 'c': { 'a': 1 } }\n */\nexport const omitDeepBy: OmitDeepBy = (object: any, cb: any) => {\n function omitByDeepByOnOwnProps(object: any) {\n if (!Array.isArray(object) && !isPlainObject(object)) {\n return object;\n }\n\n if (Array.isArray(object)) {\n return object.map((element) => omitDeepBy(element, cb));\n }\n\n const temp = {};\n\n for (const [key, value] of Object.entries<{\n [x: string]: object | PropertyName;\n }>(object)) {\n (temp as any)[key] = omitDeepBy(value, cb);\n }\n return omitBy(temp, cb);\n }\n\n return omitByDeepByOnOwnProps(object);\n};\n"],"names":["omitDeepBy","object","cb","Array","isArray","isPlainObject","map","element","temp","_i","_Object$entries","Object","entries","length","_Object$entries$_i","_slicedToArray","key","value","omitBy","omitByDeepByOnOwnProps"],"mappings":";8HAuCaA,IAAAA,EAAyB,SAACC,EAAaC,GAoBlD,OAnBA,SAAgCD,GAC9B,IAAKE,MAAMC,QAAQH,KAAYI,EAAcJ,GAC3C,OAAOA,EAGT,GAAIE,MAAMC,QAAQH,GAChB,OAAOA,EAAOK,KAAI,SAACC,GAAO,OAAKP,EAAWO,EAASL,MAKrD,IAFA,IAAMM,EAAO,CAAE,EAEfC,EAAAC,EAAAA,EAA2BC,OAAOC,QAE/BX,GAAOQ,EAAAC,EAAAG,OAAAJ,IAAE,CAFP,IAAAK,EAAAC,EAAAL,EAAAD,GAAA,GAAOO,EAAGF,EAAA,GAAEG,EAAKH,EAAA,GAGnBN,EAAaQ,GAAOhB,EAAWiB,EAAOf,EACzC,CACA,OAAOgB,EAAOV,EAAMN,EACtB,CAEOiB,CAAuBlB,EAChC"}
package/dist/index.d.ts DELETED
@@ -1,49 +0,0 @@
1
- import { PropertyName, Many, PartialObject, Dictionary, ValueKeyIteratee, NumericDictionary } from 'lodash';
2
-
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
- declare const omitDeep: OmitDeep;
25
-
26
- interface OmitDeepBy {
27
- <T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
28
- <T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
29
- <T extends object>(object: T | null | undefined, predicate: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
30
- }
31
- /**
32
- * The opposite of `_.pickBy`; this method creates an object composed of the
33
- * own and inherited enumerable properties of `object` that `predicate`
34
- * doesn't return truthy for.
35
- *
36
- * @category Function
37
- * @param object The source object.
38
- * @param [predicate] The function invoked per property.
39
- * @returns Returns the new object.
40
- * @example
41
- *
42
- * const object = { 'a': 1, 'b': null, 'c': { 'a': 1, 'b': null } };
43
- *
44
- * omitByDeep(object, _.isNil);
45
- * // => { 'a': 1, 'c': { 'a': 1 } }
46
- */
47
- declare const omitDeepBy: OmitDeepBy;
48
-
49
- export { omitDeep, omitDeepBy };