@ztimson/utils 0.27.7 → 0.27.8
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/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/dist/objects.d.ts +7 -0
- package/package.json +1 -1
package/dist/objects.d.ts
CHANGED
|
@@ -133,6 +133,13 @@ export declare function isEqual(a: any, b: any, seen?: WeakMap<object, object>):
|
|
|
133
133
|
* @param {any[]} constructors Additionally prototypes that should be merged into target
|
|
134
134
|
*/
|
|
135
135
|
export declare function mixin(target: any, constructors: any[]): void;
|
|
136
|
+
/**
|
|
137
|
+
* Run a map function on each property
|
|
138
|
+
* @param obj Object that will be iterated
|
|
139
|
+
* @param {(key: string, value: any) => any} fn Transformer function - receives key & value
|
|
140
|
+
* @returns {{}}
|
|
141
|
+
*/
|
|
142
|
+
export declare function objectMap<T>(obj: any, fn: (key: string, value: any) => any): T;
|
|
136
143
|
/**
|
|
137
144
|
* Parse JSON but return the original string if it fails
|
|
138
145
|
*
|