@cabloy/utils 2.0.18 → 2.0.19
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.js +15 -1
- package/dist/utils.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -265,6 +265,20 @@ function forEachSync(arr, order, fn) {
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
// for hold on CustomRefImpl
|
|
269
|
+
function objectAssign(...args) {
|
|
270
|
+
const target = args[0];
|
|
271
|
+
for (let i = 1; i < args.length; i++) {
|
|
272
|
+
const source = args[i];
|
|
273
|
+
const keys = Object.getOwnPropertyNames(source);
|
|
274
|
+
for (const key of keys) {
|
|
275
|
+
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
276
|
+
target[key] = desc?.value;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return target;
|
|
280
|
+
}
|
|
281
|
+
|
|
268
282
|
const celEnvBase = new Environment({
|
|
269
283
|
unlistedVariablesAreDyn: true,
|
|
270
284
|
enableOptionalTypes: true,
|
|
@@ -497,4 +511,4 @@ function zodCustomError(path, message) {
|
|
|
497
511
|
return error;
|
|
498
512
|
}
|
|
499
513
|
|
|
500
|
-
export { StringPrefixCel, StringPrefixRaw, StringPrefixRegexp, addLeadingSlash, catchError, catchErrorSync, cel, celEnvBase, checkMeta, combineApiPath, combineApiPathControllerAndAction, combineApiPathControllerAndActionRaw, combineParamsAndQuery, combineQueries, combineResourceName, combineResourceNameParts, createFunction, defaultPathSerializer, deprecated, ensureArray, evaluate, evaluateExpressions, evaluateSimple, forEach, forEachSync, getProperty, getPropertyObject, getRandomInt, hasProperty, hashkey, isClass, isClassStrict, isConstructor, isEmpty, isEmptyObject, isFunction, isNil, isNilOrEmptyString, isNumber, isObject, isPlainObject, isPromise, isString, isSymbol, isUndefined, matchSelector, normalizePath, parse, raw, regexp, replaceTemplate, safeBoolean, setProperty, sleep, stringLazy, stripEndSlash, zodCustomError };
|
|
514
|
+
export { StringPrefixCel, StringPrefixRaw, StringPrefixRegexp, addLeadingSlash, catchError, catchErrorSync, cel, celEnvBase, checkMeta, combineApiPath, combineApiPathControllerAndAction, combineApiPathControllerAndActionRaw, combineParamsAndQuery, combineQueries, combineResourceName, combineResourceNameParts, createFunction, defaultPathSerializer, deprecated, ensureArray, evaluate, evaluateExpressions, evaluateSimple, forEach, forEachSync, getProperty, getPropertyObject, getRandomInt, hasProperty, hashkey, isClass, isClassStrict, isConstructor, isEmpty, isEmptyObject, isFunction, isNil, isNilOrEmptyString, isNumber, isObject, isPlainObject, isPromise, isString, isSymbol, isUndefined, matchSelector, normalizePath, objectAssign, parse, raw, regexp, replaceTemplate, safeBoolean, setProperty, sleep, stringLazy, stripEndSlash, zodCustomError };
|
package/dist/utils.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export declare function stringLazy(fn: () => string): {
|
|
|
21
21
|
};
|
|
22
22
|
export declare function forEach<T>(arr: T[], order: boolean, fn: (item: T, index: number) => Promise<void>): Promise<void>;
|
|
23
23
|
export declare function forEachSync<T>(arr: T[], order: boolean, fn: (item: T, index: number) => void): void;
|
|
24
|
+
export declare function objectAssign<T = any>(...args: any[]): T;
|