nhb-toolbox 2.4.5 → 2.4.6

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.
@@ -36,7 +36,7 @@ export declare const flattenObjectDotNotation: <T extends GenericObjectAny>(obje
36
36
  * @param updatedObject The modified object containing potential updates.
37
37
  * @returns A new object containing only the changed fields.
38
38
  */
39
- export declare const extractUpdatedFields: <T extends GenericObjectAny>(baseObject: T, updatedObject: Partial<T>) => Partial<T>;
39
+ export declare const extractUpdatedFields: <T extends GenericObjectAny>(baseObject: T | Partial<T>, updatedObject: Partial<T>) => Partial<T>;
40
40
  /**
41
41
  * * Extracts only new fields that exist in updatedObject but not in baseObject.
42
42
  *
@@ -44,7 +44,7 @@ export declare const extractUpdatedFields: <T extends GenericObjectAny>(baseObje
44
44
  * @param updatedObject The modified object containing potential new fields.
45
45
  * @returns A new object containing only the new fields.
46
46
  */
47
- export declare const extractNewFields: <T extends GenericObjectAny>(baseObject: T, updatedObject: Partial<T> & GenericObjectAny) => GenericObjectAny;
47
+ export declare const extractNewFields: <T extends GenericObjectAny, U extends GenericObjectAny>(baseObject: T | Partial<T>, updatedObject: Partial<T> & Partial<U>) => Partial<U>;
48
48
  /**
49
49
  * * Extracts changed fields from the updated object while also identifying newly added keys.
50
50
  *
@@ -52,5 +52,5 @@ export declare const extractNewFields: <T extends GenericObjectAny>(baseObject:
52
52
  * @param updatedObject The modified object containing potential updates.
53
53
  * @returns An object containing modified fields and new fields separately.
54
54
  */
55
- export declare const extractUpdatedAndNewFields: <T extends GenericObjectAny>(baseObject: T, updatedObject: Partial<T> & GenericObjectAny) => Partial<T> & GenericObjectAny;
55
+ export declare const extractUpdatedAndNewFields: <T extends GenericObjectAny, U extends GenericObjectAny>(baseObject: T | Partial<T>, updatedObject: Partial<T> & Partial<U>) => Partial<T> & Partial<U>;
56
56
  //# sourceMappingURL=objectify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"objectify.d.ts","sourceRoot":"","sources":["../../src/object/objectify.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,gBAAgB,cAC1C,CAAC,EAAE,KACb,CAuCF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,gBAAgB,cACpD,CAAC,EAAE,KACb,gBAyBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,gBAAgB,UACvD,CAAC,KACP,CAmBF,CAAC;AACF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,gBAAgB,UAC1D,CAAC,KACP,gBAqCF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,gBAAgB,cAClD,CAAC,iBACE,OAAO,CAAC,CAAC,CAAC,KACvB,OAAO,CAAC,CAAC,CAwBX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,gBAAgB,cAC9C,CAAC,iBACE,OAAO,CAAC,CAAC,CAAC,GAAG,gBAAgB,KAC1C,gBAqBF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,gBAAgB,cACxD,CAAC,iBACE,OAAO,CAAC,CAAC,CAAC,GAAG,gBAAgB,KAC1C,OAAO,CAAC,CAAC,CAAC,GAAG,gBAwBf,CAAC"}
1
+ {"version":3,"file":"objectify.d.ts","sourceRoot":"","sources":["../../src/object/objectify.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,gBAAgB,cAC1C,CAAC,EAAE,KACb,CAuCF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,gBAAgB,cACpD,CAAC,EAAE,KACb,gBAyBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,gBAAgB,UACvD,CAAC,KACP,CAmBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,gBAAgB,UAC1D,CAAC,KACP,gBAqCF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,gBAAgB,cAClD,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,iBACX,OAAO,CAAC,CAAC,CAAC,KACvB,OAAO,CAAC,CAAC,CAwBX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC5B,CAAC,SAAS,gBAAgB,EAC1B,CAAC,SAAS,gBAAgB,cAEd,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,iBACX,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KACpC,OAAO,CAAC,CAAC,CAsBX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACtC,CAAC,SAAS,gBAAgB,EAC1B,CAAC,SAAS,gBAAgB,cAEd,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,iBACX,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KACpC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAwBxB,CAAC"}
@@ -175,7 +175,8 @@ const extractNewFields = (baseObject, updatedObject) => {
175
175
  // Recursively extract new fields inside nested objects
176
176
  const nestedNewFields = (0, exports.extractNewFields)(baseObject[key], updatedObject[key]);
177
177
  if (!(0, basics_1.isEmptyObject)(nestedNewFields)) {
178
- newFields[key] = nestedNewFields;
178
+ newFields[key] =
179
+ nestedNewFields;
179
180
  }
180
181
  }
181
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhb-toolbox",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "A versatile collection of smart, efficient, and reusable utility functions for everyday development needs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",