@superutils/core 1.1.0 → 1.1.4
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.d.ts +8 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -681,7 +681,7 @@ declare const throttled: {
|
|
|
681
681
|
*/
|
|
682
682
|
defaults: {
|
|
683
683
|
onError: undefined;
|
|
684
|
-
trailing:
|
|
684
|
+
trailing: false;
|
|
685
685
|
};
|
|
686
686
|
};
|
|
687
687
|
|
|
@@ -724,7 +724,7 @@ declare const objClean: <T extends Record<PropertyKey, unknown>, Key extends key
|
|
|
724
724
|
* Deep-copy an object to another object
|
|
725
725
|
*
|
|
726
726
|
* @param input input object
|
|
727
|
-
* @param
|
|
727
|
+
* @param output (optional) output object
|
|
728
728
|
* @param ignoreKeys (optional) input peroperties to be ignored. Prevents output's property to be overriden.
|
|
729
729
|
*
|
|
730
730
|
* For child object properties use "." (dot) separated path.
|
|
@@ -746,7 +746,7 @@ declare const objClean: <T extends Record<PropertyKey, unknown>, Key extends key
|
|
|
746
746
|
*
|
|
747
747
|
* Default: `false`
|
|
748
748
|
*
|
|
749
|
-
* @param
|
|
749
|
+
* @param recursive (optional) whether to recursively copy nested objects. Default: `false`
|
|
750
750
|
*
|
|
751
751
|
*
|
|
752
752
|
* @returns copied and/or merged object
|
|
@@ -786,7 +786,7 @@ declare const objCreate: <V, K extends PropertyKey, RV, RK extends PropertyKey,
|
|
|
786
786
|
*
|
|
787
787
|
* @param input
|
|
788
788
|
* @param keys
|
|
789
|
-
* @param
|
|
789
|
+
* @param requireValue (optional) whether each property should have some value.
|
|
790
790
|
*/
|
|
791
791
|
declare function objHasKeys(input?: object | unknown[], keys?: PropertyKey[], requireValue?: boolean): boolean;
|
|
792
792
|
|
|
@@ -1025,7 +1025,7 @@ type SearchOptions<K, V, MatchExact extends boolean = false, AsMap extends boole
|
|
|
1025
1025
|
* 2. `key`: index/key
|
|
1026
1026
|
* 3. `data`: value provided in the first argument (`data`)
|
|
1027
1027
|
* @param limit (optional) limit number of results
|
|
1028
|
-
* @param
|
|
1028
|
+
* @param asArray
|
|
1029
1029
|
*
|
|
1030
1030
|
* @returns new Map with filtered items
|
|
1031
1031
|
*
|
|
@@ -1318,11 +1318,11 @@ declare const mapJoin: <K, V>(...inputs: (Map<K, V> | [K, V][])[]) => Map<K, V>;
|
|
|
1318
1318
|
declare const randomInt: (min?: number, max?: number) => number;
|
|
1319
1319
|
|
|
1320
1320
|
/** Describes a number type with negative values only */
|
|
1321
|
-
type NegativeNumber<N
|
|
1321
|
+
type NegativeNumber<N> = N extends number ? `${N}` extends `-${string}` ? N : never : never;
|
|
1322
1322
|
/** Describes a number type with positive values excluding `0` */
|
|
1323
|
-
type PositiveNumber<N
|
|
1323
|
+
type PositiveNumber<N> = N extends number ? `${N}` extends `-${string}` | '0' ? never : N : never;
|
|
1324
1324
|
/** Describes a number type with positive values and `0` */
|
|
1325
|
-
type PositiveNumberWithZero<N
|
|
1325
|
+
type PositiveNumberWithZero<N> = N extends number ? `${N}` extends `-${string}` ? never : N : never;
|
|
1326
1326
|
|
|
1327
1327
|
/**
|
|
1328
1328
|
* Clears clutter from strings
|
package/dist/index.js
CHANGED
package/package.json
CHANGED