radashi 12.9.0 → 12.9.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.
- package/dist/radashi.cjs +4 -4
- package/dist/radashi.d.cts +6 -0
- package/dist/radashi.d.ts +6 -0
- package/dist/radashi.js +4 -4
- package/package.json +1 -1
package/dist/radashi.cjs
CHANGED
|
@@ -1078,7 +1078,7 @@ function crush(value) {
|
|
|
1078
1078
|
if (!value) {
|
|
1079
1079
|
return {};
|
|
1080
1080
|
}
|
|
1081
|
-
return function crushReducer(crushed, value2, path) {
|
|
1081
|
+
return (function crushReducer(crushed, value2, path) {
|
|
1082
1082
|
if (isObject(value2) || isArray(value2)) {
|
|
1083
1083
|
for (const [prop, propValue] of Object.entries(value2)) {
|
|
1084
1084
|
crushReducer(crushed, propValue, path ? `${path}.${prop}` : prop);
|
|
@@ -1087,7 +1087,7 @@ function crush(value) {
|
|
|
1087
1087
|
crushed[path] = value2;
|
|
1088
1088
|
}
|
|
1089
1089
|
return crushed;
|
|
1090
|
-
}({}, value, "");
|
|
1090
|
+
})({}, value, "");
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
1093
|
// src/object/filterKey.ts
|
|
@@ -1298,7 +1298,7 @@ function set(initial, path, value) {
|
|
|
1298
1298
|
if (!path || value === void 0) {
|
|
1299
1299
|
return initial;
|
|
1300
1300
|
}
|
|
1301
|
-
return function recurse(object, keys2, index) {
|
|
1301
|
+
return (function recurse(object, keys2, index) {
|
|
1302
1302
|
const key = keys2[index];
|
|
1303
1303
|
object ??= isIntString(key) ? [] : {};
|
|
1304
1304
|
if (isDangerousKey(key, object)) {
|
|
@@ -1312,7 +1312,7 @@ function set(initial, path, value) {
|
|
|
1312
1312
|
object[key] = value;
|
|
1313
1313
|
}
|
|
1314
1314
|
return object;
|
|
1315
|
-
}(initial, path.match(/[^.[\]]+/g), 0);
|
|
1315
|
+
})(initial, path.match(/[^.[\]]+/g), 0);
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
1318
1318
|
// src/object/shake.ts
|
package/dist/radashi.d.cts
CHANGED
|
@@ -4047,6 +4047,12 @@ declare function isNumber(value: unknown): value is number;
|
|
|
4047
4047
|
* `Object.create(null)` result. Objects from [other realms][1] are
|
|
4048
4048
|
* also supported.
|
|
4049
4049
|
*
|
|
4050
|
+
* Use this as a TypeScript type guard only when the input is known to
|
|
4051
|
+
* be either an object accepted by `isObject` or a non-object value. The
|
|
4052
|
+
* `object` type in TypeScript also includes arrays, functions, dates,
|
|
4053
|
+
* maps, sets, and other object-like values that `isObject` may reject
|
|
4054
|
+
* at runtime.
|
|
4055
|
+
*
|
|
4050
4056
|
* [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms
|
|
4051
4057
|
*
|
|
4052
4058
|
* @see https://radashi.js.org/reference/typed/isObject
|
package/dist/radashi.d.ts
CHANGED
|
@@ -4047,6 +4047,12 @@ declare function isNumber(value: unknown): value is number;
|
|
|
4047
4047
|
* `Object.create(null)` result. Objects from [other realms][1] are
|
|
4048
4048
|
* also supported.
|
|
4049
4049
|
*
|
|
4050
|
+
* Use this as a TypeScript type guard only when the input is known to
|
|
4051
|
+
* be either an object accepted by `isObject` or a non-object value. The
|
|
4052
|
+
* `object` type in TypeScript also includes arrays, functions, dates,
|
|
4053
|
+
* maps, sets, and other object-like values that `isObject` may reject
|
|
4054
|
+
* at runtime.
|
|
4055
|
+
*
|
|
4050
4056
|
* [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms
|
|
4051
4057
|
*
|
|
4052
4058
|
* @see https://radashi.js.org/reference/typed/isObject
|
package/dist/radashi.js
CHANGED
|
@@ -1076,7 +1076,7 @@ function crush(value) {
|
|
|
1076
1076
|
if (!value) {
|
|
1077
1077
|
return {};
|
|
1078
1078
|
}
|
|
1079
|
-
return function crushReducer(crushed, value2, path) {
|
|
1079
|
+
return (function crushReducer(crushed, value2, path) {
|
|
1080
1080
|
if (isObject(value2) || isArray(value2)) {
|
|
1081
1081
|
for (const [prop, propValue] of Object.entries(value2)) {
|
|
1082
1082
|
crushReducer(crushed, propValue, path ? `${path}.${prop}` : prop);
|
|
@@ -1085,7 +1085,7 @@ function crush(value) {
|
|
|
1085
1085
|
crushed[path] = value2;
|
|
1086
1086
|
}
|
|
1087
1087
|
return crushed;
|
|
1088
|
-
}({}, value, "");
|
|
1088
|
+
})({}, value, "");
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
1091
|
// src/object/filterKey.ts
|
|
@@ -1296,7 +1296,7 @@ function set(initial, path, value) {
|
|
|
1296
1296
|
if (!path || value === void 0) {
|
|
1297
1297
|
return initial;
|
|
1298
1298
|
}
|
|
1299
|
-
return function recurse(object, keys2, index) {
|
|
1299
|
+
return (function recurse(object, keys2, index) {
|
|
1300
1300
|
const key = keys2[index];
|
|
1301
1301
|
object ??= isIntString(key) ? [] : {};
|
|
1302
1302
|
if (isDangerousKey(key, object)) {
|
|
@@ -1310,7 +1310,7 @@ function set(initial, path, value) {
|
|
|
1310
1310
|
object[key] = value;
|
|
1311
1311
|
}
|
|
1312
1312
|
return object;
|
|
1313
|
-
}(initial, path.match(/[^.[\]]+/g), 0);
|
|
1313
|
+
})(initial, path.match(/[^.[\]]+/g), 0);
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
1316
|
// src/object/shake.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "radashi",
|
|
3
|
-
"version": "12.9.
|
|
3
|
+
"version": "12.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The modern, community-first TypeScript toolkit with all of the fast, readable, and minimal utility functions you need. Type-safe, dependency-free, tree-shakeable, fully tested.",
|
|
6
6
|
"repository": {
|