radashi 12.2.0-beta.3a97871 → 12.2.0-beta.437b4fe
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 +0 -7
- package/dist/index.d.cts +1 -15
- package/dist/index.d.ts +1 -15
- package/dist/index.js +0 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40,7 +40,6 @@ __export(src_exports, {
|
|
|
40
40
|
defer: () => defer,
|
|
41
41
|
diff: () => diff,
|
|
42
42
|
draw: () => draw,
|
|
43
|
-
filterKey: () => filterKey,
|
|
44
43
|
first: () => first,
|
|
45
44
|
flat: () => flat,
|
|
46
45
|
fork: () => fork,
|
|
@@ -755,11 +754,6 @@ var crush = (value) => {
|
|
|
755
754
|
);
|
|
756
755
|
};
|
|
757
756
|
|
|
758
|
-
// src/object/filterKey.ts
|
|
759
|
-
var filterKey = (obj, key, filter) => {
|
|
760
|
-
return Object.hasOwnProperty.call(obj, key) && (filter == null || (isArray(filter) ? filter.includes(key) : filter(obj[key], key, obj)));
|
|
761
|
-
};
|
|
762
|
-
|
|
763
757
|
// src/object/get.ts
|
|
764
758
|
var get = (value, path, defaultValue) => {
|
|
765
759
|
const segments = path.split(/[\.\[\]]/g);
|
|
@@ -1186,7 +1180,6 @@ var isSymbol = (value) => {
|
|
|
1186
1180
|
defer,
|
|
1187
1181
|
diff,
|
|
1188
1182
|
draw,
|
|
1189
|
-
filterKey,
|
|
1190
1183
|
first,
|
|
1191
1184
|
flat,
|
|
1192
1185
|
fork,
|
package/dist/index.d.cts
CHANGED
|
@@ -511,20 +511,6 @@ declare const construct: <TObject extends object>(obj: TObject) => object;
|
|
|
511
511
|
*/
|
|
512
512
|
declare const crush: <TValue extends object>(value: TValue) => object;
|
|
513
513
|
|
|
514
|
-
type KeyOf<T extends object> = object extends T ? keyof any : keyof T;
|
|
515
|
-
type ValueOf<T extends object> = object extends T ? unknown : T[keyof T];
|
|
516
|
-
type KeyFilterFunction<T extends object = object> = (value: ValueOf<T>, key: KeyOf<T>, obj: T) => boolean;
|
|
517
|
-
/**
|
|
518
|
-
* Functions can use this type to accept either an array of keys or a
|
|
519
|
-
* filter function.
|
|
520
|
-
*/
|
|
521
|
-
type KeyFilter<T extends object = object, Key extends keyof any = keyof any> = KeyFilterFunction<T> | readonly Key[];
|
|
522
|
-
/**
|
|
523
|
-
* Returns true if the key is in the “keys array” or if the “filter
|
|
524
|
-
* function” returns true.
|
|
525
|
-
*/
|
|
526
|
-
declare const filterKey: (obj: object, key: keyof any, filter: KeyFilter | null | undefined) => boolean;
|
|
527
|
-
|
|
528
514
|
/**
|
|
529
515
|
* Dynamically get a nested value from an array or object with a
|
|
530
516
|
* string.
|
|
@@ -757,4 +743,4 @@ declare const isString: (value: any) => value is string;
|
|
|
757
743
|
|
|
758
744
|
declare const isSymbol: (value: any) => value is symbol;
|
|
759
745
|
|
|
760
|
-
export { AggregateError, type DebounceFunction, type
|
|
746
|
+
export { AggregateError, type DebounceFunction, type RetryOptions, type ThrottledFunction, all, alphabetical, assign, boil, callable, camel, capitalize, chain, clone, cluster, compose, construct, counting, crush, dash, debounce, defer, diff, draw, first, flat, fork, get, group, guard, inRange, intersects, invert, isArray, isDate, isEmpty, isEqual, isFloat, isFunction, isInt, isIntString, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isString, isSymbol, iterate, keys, last, list, listify, lowerize, map, mapEntries, mapKeys, mapValues, max, memo, merge, min, objectify, omit, parallel, partial, partob, pascal, pick, proxied, random, range, reduce, replace, replaceOrAppend, retry, select, series, set, shake, shift, shuffle, sift, sleep, snake, sort, sum, template, throttle, title, toFloat, toInt, toggle, trim, tryit as try, tryit, uid, unique, upperize, zip, zipToObject };
|
package/dist/index.d.ts
CHANGED
|
@@ -511,20 +511,6 @@ declare const construct: <TObject extends object>(obj: TObject) => object;
|
|
|
511
511
|
*/
|
|
512
512
|
declare const crush: <TValue extends object>(value: TValue) => object;
|
|
513
513
|
|
|
514
|
-
type KeyOf<T extends object> = object extends T ? keyof any : keyof T;
|
|
515
|
-
type ValueOf<T extends object> = object extends T ? unknown : T[keyof T];
|
|
516
|
-
type KeyFilterFunction<T extends object = object> = (value: ValueOf<T>, key: KeyOf<T>, obj: T) => boolean;
|
|
517
|
-
/**
|
|
518
|
-
* Functions can use this type to accept either an array of keys or a
|
|
519
|
-
* filter function.
|
|
520
|
-
*/
|
|
521
|
-
type KeyFilter<T extends object = object, Key extends keyof any = keyof any> = KeyFilterFunction<T> | readonly Key[];
|
|
522
|
-
/**
|
|
523
|
-
* Returns true if the key is in the “keys array” or if the “filter
|
|
524
|
-
* function” returns true.
|
|
525
|
-
*/
|
|
526
|
-
declare const filterKey: (obj: object, key: keyof any, filter: KeyFilter | null | undefined) => boolean;
|
|
527
|
-
|
|
528
514
|
/**
|
|
529
515
|
* Dynamically get a nested value from an array or object with a
|
|
530
516
|
* string.
|
|
@@ -757,4 +743,4 @@ declare const isString: (value: any) => value is string;
|
|
|
757
743
|
|
|
758
744
|
declare const isSymbol: (value: any) => value is symbol;
|
|
759
745
|
|
|
760
|
-
export { AggregateError, type DebounceFunction, type
|
|
746
|
+
export { AggregateError, type DebounceFunction, type RetryOptions, type ThrottledFunction, all, alphabetical, assign, boil, callable, camel, capitalize, chain, clone, cluster, compose, construct, counting, crush, dash, debounce, defer, diff, draw, first, flat, fork, get, group, guard, inRange, intersects, invert, isArray, isDate, isEmpty, isEqual, isFloat, isFunction, isInt, isIntString, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isString, isSymbol, iterate, keys, last, list, listify, lowerize, map, mapEntries, mapKeys, mapValues, max, memo, merge, min, objectify, omit, parallel, partial, partob, pascal, pick, proxied, random, range, reduce, replace, replaceOrAppend, retry, select, series, set, shake, shift, shuffle, sift, sleep, snake, sort, sum, template, throttle, title, toFloat, toInt, toggle, trim, tryit as try, tryit, uid, unique, upperize, zip, zipToObject };
|
package/dist/index.js
CHANGED
|
@@ -632,11 +632,6 @@ var crush = (value) => {
|
|
|
632
632
|
);
|
|
633
633
|
};
|
|
634
634
|
|
|
635
|
-
// src/object/filterKey.ts
|
|
636
|
-
var filterKey = (obj, key, filter) => {
|
|
637
|
-
return Object.hasOwnProperty.call(obj, key) && (filter == null || (isArray(filter) ? filter.includes(key) : filter(obj[key], key, obj)));
|
|
638
|
-
};
|
|
639
|
-
|
|
640
635
|
// src/object/get.ts
|
|
641
636
|
var get = (value, path, defaultValue) => {
|
|
642
637
|
const segments = path.split(/[\.\[\]]/g);
|
|
@@ -1062,7 +1057,6 @@ export {
|
|
|
1062
1057
|
defer,
|
|
1063
1058
|
diff,
|
|
1064
1059
|
draw,
|
|
1065
|
-
filterKey,
|
|
1066
1060
|
first,
|
|
1067
1061
|
flat,
|
|
1068
1062
|
fork,
|