@weapp-core/shared 1.0.6 → 1.0.7
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 +14 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.21_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.21_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -228,6 +228,7 @@ __export(index_exports, {
|
|
|
228
228
|
defuOverrideArray: () => defuOverrideArray,
|
|
229
229
|
escapeStringRegexp: () => escapeStringRegexp,
|
|
230
230
|
get: () => index_default,
|
|
231
|
+
isEmptyObject: () => isEmptyObject,
|
|
231
232
|
isObject: () => isObject2,
|
|
232
233
|
objectHash: () => import_object_hash.default,
|
|
233
234
|
removeExtension: () => removeExtension,
|
|
@@ -428,6 +429,16 @@ var defuOverrideArray = createDefu((obj, key, value) => {
|
|
|
428
429
|
function isObject2(x) {
|
|
429
430
|
return typeof x === "object" && x !== null;
|
|
430
431
|
}
|
|
432
|
+
function isEmptyObject(obj) {
|
|
433
|
+
if (isObject2(obj)) {
|
|
434
|
+
let name;
|
|
435
|
+
for (name in obj) {
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
return true;
|
|
439
|
+
}
|
|
440
|
+
return false;
|
|
441
|
+
}
|
|
431
442
|
// Annotate the CommonJS export names for ESM import in node:
|
|
432
443
|
0 && (module.exports = {
|
|
433
444
|
addExtension,
|
|
@@ -436,6 +447,7 @@ function isObject2(x) {
|
|
|
436
447
|
defuOverrideArray,
|
|
437
448
|
escapeStringRegexp,
|
|
438
449
|
get,
|
|
450
|
+
isEmptyObject,
|
|
439
451
|
isObject,
|
|
440
452
|
objectHash,
|
|
441
453
|
removeExtension,
|
package/dist/index.d.cts
CHANGED
|
@@ -20,5 +20,6 @@ declare const defuOverrideArray: <Source extends {
|
|
|
20
20
|
[x: symbol]: any;
|
|
21
21
|
} | (number | boolean | any[] | Record<never, any> | null | undefined)>>(source: Source, ...defaults: Defaults) => defu.Defu<Source, Defaults>;
|
|
22
22
|
declare function isObject(x: unknown): x is Record<string | symbol | number, unknown>;
|
|
23
|
+
declare function isEmptyObject(obj: unknown): boolean;
|
|
23
24
|
|
|
24
|
-
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isObject, removeExtension, removeExtensionDeep };
|
|
25
|
+
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isEmptyObject, isObject, removeExtension, removeExtensionDeep };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,5 +20,6 @@ declare const defuOverrideArray: <Source extends {
|
|
|
20
20
|
[x: symbol]: any;
|
|
21
21
|
} | (number | boolean | any[] | Record<never, any> | null | undefined)>>(source: Source, ...defaults: Defaults) => defu.Defu<Source, Defaults>;
|
|
22
22
|
declare function isObject(x: unknown): x is Record<string | symbol | number, unknown>;
|
|
23
|
+
declare function isEmptyObject(obj: unknown): boolean;
|
|
23
24
|
|
|
24
|
-
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isObject, removeExtension, removeExtensionDeep };
|
|
25
|
+
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isEmptyObject, isObject, removeExtension, removeExtensionDeep };
|
package/dist/index.js
CHANGED
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.21_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
32
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.21_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -407,6 +407,16 @@ var defuOverrideArray = createDefu((obj, key, value) => {
|
|
|
407
407
|
function isObject2(x) {
|
|
408
408
|
return typeof x === "object" && x !== null;
|
|
409
409
|
}
|
|
410
|
+
function isEmptyObject(obj) {
|
|
411
|
+
if (isObject2(obj)) {
|
|
412
|
+
let name;
|
|
413
|
+
for (name in obj) {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
410
420
|
var export_set = import_set_value.default;
|
|
411
421
|
export {
|
|
412
422
|
addExtension,
|
|
@@ -415,6 +425,7 @@ export {
|
|
|
415
425
|
defuOverrideArray,
|
|
416
426
|
escapeStringRegexp,
|
|
417
427
|
index_default as get,
|
|
428
|
+
isEmptyObject,
|
|
418
429
|
isObject2 as isObject,
|
|
419
430
|
objectHash,
|
|
420
431
|
removeExtension,
|