@valkyriestudios/utils 12.3.0 → 12.5.0
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/README.md +15 -4
- package/array/dedupe.d.ts +2 -1
- package/array/dedupe.js +3 -1
- package/array/index.d.ts +10 -0
- package/array/index.js +25 -0
- package/array/is.d.ts +2 -1
- package/array/is.js +2 -0
- package/array/isNotEmpty.d.ts +2 -1
- package/array/isNotEmpty.js +2 -0
- package/array/join.d.ts +2 -2
- package/array/join.js +3 -1
- package/array/mapFn.d.ts +4 -7
- package/array/mapFn.js +2 -0
- package/array/mapKey.d.ts +3 -4
- package/array/mapKey.js +2 -0
- package/array/mapPrimitive.d.ts +2 -2
- package/array/mapPrimitive.js +3 -1
- package/array/shuffle.d.ts +2 -1
- package/array/shuffle.js +2 -0
- package/array/sort.d.ts +2 -2
- package/array/sort.js +4 -2
- package/boolean/index.d.ts +2 -0
- package/boolean/index.js +6 -0
- package/boolean/is.d.ts +2 -1
- package/boolean/is.js +2 -0
- package/caching/index.d.ts +2 -0
- package/caching/index.js +5 -0
- package/caching/memoize.d.ts +2 -1
- package/caching/memoize.js +2 -0
- package/date/addUTC.d.ts +2 -1
- package/date/addUTC.js +3 -3
- package/date/diff.d.ts +2 -1
- package/date/diff.js +4 -2
- package/date/endOfUTC.d.ts +2 -1
- package/date/endOfUTC.js +3 -3
- package/date/format.d.ts +2 -1
- package/date/format.js +3 -1
- package/date/index.d.ts +11 -0
- package/date/index.js +24 -0
- package/date/is.d.ts +2 -1
- package/date/is.js +2 -0
- package/date/nowUnix.d.ts +2 -1
- package/date/nowUnix.js +2 -0
- package/date/nowUnixMs.d.ts +2 -1
- package/date/nowUnixMs.js +2 -0
- package/date/startOfUTC.d.ts +2 -1
- package/date/startOfUTC.js +3 -3
- package/date/toUTC.d.ts +2 -1
- package/date/toUTC.js +3 -1
- package/date/toUnix.d.ts +2 -1
- package/date/toUnix.js +3 -1
- package/deep/freeze.d.ts +2 -2
- package/deep/freeze.js +2 -0
- package/deep/get.d.ts +2 -1
- package/deep/get.js +2 -0
- package/deep/index.d.ts +5 -0
- package/deep/index.js +15 -0
- package/deep/seal.d.ts +2 -2
- package/deep/seal.js +2 -0
- package/deep/set.d.ts +2 -1
- package/deep/set.js +2 -0
- package/equal.d.ts +1 -1
- package/equal.js +4 -2
- package/formdata/index.d.ts +2 -0
- package/formdata/index.js +6 -0
- package/formdata/is.d.ts +9 -0
- package/formdata/is.js +8 -0
- package/function/index.d.ts +7 -0
- package/function/index.js +19 -0
- package/function/is.d.ts +2 -1
- package/function/is.js +2 -0
- package/function/isAsync.d.ts +2 -1
- package/function/isAsync.js +2 -0
- package/function/noop.d.ts +2 -1
- package/function/noop.js +2 -0
- package/function/noopresolve.d.ts +2 -1
- package/function/noopresolve.js +2 -0
- package/function/noopreturn.d.ts +2 -1
- package/function/noopreturn.js +2 -0
- package/function/sleep.d.ts +2 -1
- package/function/sleep.js +2 -0
- package/hash/fnv1A.d.ts +2 -1
- package/hash/fnv1A.js +2 -0
- package/hash/guid.d.ts +2 -1
- package/hash/guid.js +2 -0
- package/hash/index.d.ts +3 -0
- package/hash/index.js +7 -0
- package/index.d.ts +386 -238
- package/is.d.ts +52 -66
- package/is.js +61 -73
- package/number/index.d.ts +18 -0
- package/number/index.js +57 -0
- package/number/is.d.ts +2 -1
- package/number/is.js +2 -0
- package/number/isAbove.d.ts +2 -1
- package/number/isAbove.js +2 -0
- package/number/isAboveOrEqual.d.ts +2 -1
- package/number/isAboveOrEqual.js +2 -0
- package/number/isBelow.d.ts +2 -1
- package/number/isBelow.js +2 -0
- package/number/isBelowOrEqual.d.ts +2 -1
- package/number/isBelowOrEqual.js +2 -0
- package/number/isBetween.d.ts +2 -1
- package/number/isBetween.js +2 -0
- package/number/isInteger.d.ts +2 -1
- package/number/isInteger.js +2 -0
- package/number/isIntegerAbove.d.ts +2 -1
- package/number/isIntegerAbove.js +2 -0
- package/number/isIntegerAboveOrEqual.d.ts +2 -1
- package/number/isIntegerAboveOrEqual.js +2 -0
- package/number/isIntegerBelow.d.ts +2 -1
- package/number/isIntegerBelow.js +2 -0
- package/number/isIntegerBelowOrEqual.d.ts +2 -1
- package/number/isIntegerBelowOrEqual.js +2 -0
- package/number/isIntegerBetween.d.ts +2 -1
- package/number/isIntegerBetween.js +2 -0
- package/number/isNumericalNaN.d.ts +2 -1
- package/number/isNumericalNaN.js +2 -0
- package/number/randomBetween.d.ts +2 -1
- package/number/randomBetween.js +2 -0
- package/number/randomIntBetween.d.ts +2 -1
- package/number/randomIntBetween.js +2 -0
- package/number/round.d.ts +2 -1
- package/number/round.js +2 -0
- package/number/toPercentage.d.ts +2 -1
- package/number/toPercentage.js +3 -1
- package/object/define.d.ts +2 -1
- package/object/define.js +2 -0
- package/object/index.d.ts +6 -0
- package/object/index.js +17 -0
- package/object/is.d.ts +2 -1
- package/object/is.js +2 -0
- package/object/isNotEmpty.d.ts +2 -1
- package/object/isNotEmpty.js +2 -0
- package/object/merge.d.ts +1 -1
- package/object/merge.js +2 -0
- package/object/pick.d.ts +2 -1
- package/object/pick.js +4 -2
- package/package.json +1 -1
- package/regexp/index.d.ts +3 -0
- package/regexp/index.js +9 -0
- package/regexp/is.d.ts +2 -1
- package/regexp/is.js +2 -0
- package/regexp/sanitize.d.ts +2 -1
- package/regexp/sanitize.js +2 -0
- package/string/humanizeBytes.d.ts +2 -2
- package/string/humanizeBytes.js +4 -3
- package/string/humanizeNumber.d.ts +2 -2
- package/string/humanizeNumber.js +3 -1
- package/string/index.d.ts +7 -0
- package/string/index.js +20 -0
- package/string/is.d.ts +2 -1
- package/string/is.js +2 -0
- package/string/isBetween.d.ts +2 -1
- package/string/isBetween.js +2 -0
- package/string/isNotEmpty.d.ts +2 -1
- package/string/isNotEmpty.js +2 -0
- package/string/shorten.d.ts +2 -1
- package/string/shorten.js +2 -0
package/index.d.ts
CHANGED
|
@@ -1,173 +1,30 @@
|
|
|
1
1
|
declare module "number/isNumericalNaN" {
|
|
2
|
-
|
|
2
|
+
function isNumericalNaN(val: unknown): boolean;
|
|
3
|
+
export { isNumericalNaN, isNumericalNaN as default };
|
|
3
4
|
}
|
|
4
5
|
declare module "equal" {
|
|
5
6
|
function equal(a: any, b: any): boolean;
|
|
6
|
-
export default
|
|
7
|
-
}
|
|
8
|
-
declare module "array/isNotEmpty" {
|
|
9
|
-
export default function isNotEmptyArray(val: unknown): val is unknown[];
|
|
10
|
-
}
|
|
11
|
-
declare module "array/is" {
|
|
12
|
-
export default function isArray(val: unknown): val is unknown[];
|
|
13
|
-
}
|
|
14
|
-
declare module "boolean/is" {
|
|
15
|
-
export default function isBoolean(val: unknown): val is boolean;
|
|
16
|
-
}
|
|
17
|
-
declare module "date/is" {
|
|
18
|
-
export default function isDate(val: unknown): val is Date;
|
|
19
|
-
}
|
|
20
|
-
declare module "function/is" {
|
|
21
|
-
export default function isFunction(val: unknown): val is (...args: unknown[]) => unknown;
|
|
22
|
-
}
|
|
23
|
-
declare module "function/isAsync" {
|
|
24
|
-
export default function isAsyncFunction(val: unknown): val is (...args: unknown[]) => Promise<unknown>;
|
|
25
|
-
}
|
|
26
|
-
declare module "number/is" {
|
|
27
|
-
export default function isNumber(val: unknown): val is number;
|
|
28
|
-
}
|
|
29
|
-
declare module "number/isBetween" {
|
|
30
|
-
export default function isNumberBetween(val: unknown, min: number, max: number): val is number;
|
|
31
|
-
}
|
|
32
|
-
declare module "number/isBelow" {
|
|
33
|
-
export default function isNumberBelow(val: unknown, ref: number): val is number;
|
|
34
|
-
}
|
|
35
|
-
declare module "number/isBelowOrEqual" {
|
|
36
|
-
export default function isNumberBelowOrEqual(val: unknown, ref: number): val is number;
|
|
37
|
-
}
|
|
38
|
-
declare module "number/isAbove" {
|
|
39
|
-
export default function isNumberAbove(val: unknown, ref: number): val is number;
|
|
40
|
-
}
|
|
41
|
-
declare module "number/isAboveOrEqual" {
|
|
42
|
-
export default function isNumberAboveOrEqual(val: unknown, ref: number): val is number;
|
|
43
|
-
}
|
|
44
|
-
declare module "number/isInteger" {
|
|
45
|
-
export default function isInteger(val: unknown): val is number;
|
|
46
|
-
}
|
|
47
|
-
declare module "number/isIntegerBetween" {
|
|
48
|
-
export default function isIntegerBetween(val: unknown, min: number, max: number): val is number;
|
|
49
|
-
}
|
|
50
|
-
declare module "number/isIntegerBelow" {
|
|
51
|
-
export default function isIntegerBelow(val: unknown, ref: number): val is number;
|
|
52
|
-
}
|
|
53
|
-
declare module "number/isIntegerBelowOrEqual" {
|
|
54
|
-
export default function isIntegerBelowOrEqual(val: unknown, ref: number): val is number;
|
|
55
|
-
}
|
|
56
|
-
declare module "number/isIntegerAbove" {
|
|
57
|
-
export default function isIntegerAbove(val: unknown, ref: number): val is number;
|
|
58
|
-
}
|
|
59
|
-
declare module "number/isIntegerAboveOrEqual" {
|
|
60
|
-
export default function isIntegerAboveOrEqual(val: unknown, ref: number): val is number;
|
|
61
|
-
}
|
|
62
|
-
declare module "regexp/is" {
|
|
63
|
-
export default function isRegExp(val: unknown): val is RegExp;
|
|
64
|
-
}
|
|
65
|
-
declare module "object/is" {
|
|
66
|
-
export default function isObject(val: unknown): val is {
|
|
67
|
-
[key: string]: any;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
declare module "object/isNotEmpty" {
|
|
71
|
-
export default function isNotEmptyObject(val: unknown): val is {
|
|
72
|
-
[key: string]: any;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
declare module "string/is" {
|
|
76
|
-
export default function isString(val: unknown): val is string;
|
|
77
|
-
}
|
|
78
|
-
declare module "string/isBetween" {
|
|
79
|
-
export default function isStringBetween(val: unknown, min: number, max: number, trimmed?: boolean): val is string;
|
|
80
|
-
}
|
|
81
|
-
declare module "string/isNotEmpty" {
|
|
82
|
-
export default function isNotEmptyString(val: unknown, trimmed?: boolean): val is string;
|
|
83
|
-
}
|
|
84
|
-
declare module "is" {
|
|
85
|
-
import equal from "equal";
|
|
86
|
-
import isNotEmptyArray from "array/isNotEmpty";
|
|
87
|
-
import isArray from "array/is";
|
|
88
|
-
import isBoolean from "boolean/is";
|
|
89
|
-
import isDate from "date/is";
|
|
90
|
-
import isFunction from "function/is";
|
|
91
|
-
import isAsyncFunction from "function/isAsync";
|
|
92
|
-
import isNumber from "number/is";
|
|
93
|
-
import isNumberBetween from "number/isBetween";
|
|
94
|
-
import isNumberBelow from "number/isBelow";
|
|
95
|
-
import isNumberBelowOrEqual from "number/isBelowOrEqual";
|
|
96
|
-
import isNumberAbove from "number/isAbove";
|
|
97
|
-
import isNumberAboveOrEqual from "number/isAboveOrEqual";
|
|
98
|
-
import isInteger from "number/isInteger";
|
|
99
|
-
import isIntegerBetween from "number/isIntegerBetween";
|
|
100
|
-
import isIntegerBelow from "number/isIntegerBelow";
|
|
101
|
-
import isIntegerBelowOrEqual from "number/isIntegerBelowOrEqual";
|
|
102
|
-
import isIntegerAbove from "number/isIntegerAbove";
|
|
103
|
-
import isIntegerAboveOrEqual from "number/isIntegerAboveOrEqual";
|
|
104
|
-
import isRegExp from "regexp/is";
|
|
105
|
-
import isObject from "object/is";
|
|
106
|
-
import isNotEmptyObject from "object/isNotEmpty";
|
|
107
|
-
import isString from "string/is";
|
|
108
|
-
import isStringBetween from "string/isBetween";
|
|
109
|
-
import isNotEmptyString from "string/isNotEmpty";
|
|
110
|
-
const Is: Readonly<{
|
|
111
|
-
Array: typeof isArray;
|
|
112
|
-
NeArray: typeof isNotEmptyArray;
|
|
113
|
-
NotEmptyArray: typeof isNotEmptyArray;
|
|
114
|
-
Boolean: typeof isBoolean;
|
|
115
|
-
Date: typeof isDate;
|
|
116
|
-
Function: typeof isFunction;
|
|
117
|
-
AsyncFunction: typeof isAsyncFunction;
|
|
118
|
-
Num: typeof isNumber;
|
|
119
|
-
NumBetween: typeof isNumberBetween;
|
|
120
|
-
NumAbove: typeof isNumberAbove;
|
|
121
|
-
NumAboveOrEqual: typeof isNumberAboveOrEqual;
|
|
122
|
-
NumBelow: typeof isNumberBelow;
|
|
123
|
-
NumBelowOrEqual: typeof isNumberBelowOrEqual;
|
|
124
|
-
NumGt: typeof isNumberAbove;
|
|
125
|
-
NumGte: typeof isNumberAboveOrEqual;
|
|
126
|
-
NumLt: typeof isNumberBelow;
|
|
127
|
-
NumLte: typeof isNumberBelowOrEqual;
|
|
128
|
-
Number: typeof isNumber;
|
|
129
|
-
NumberBetween: typeof isNumberBetween;
|
|
130
|
-
NumberAbove: typeof isNumberAbove;
|
|
131
|
-
NumberAboveOrEqual: typeof isNumberAboveOrEqual;
|
|
132
|
-
NumberBelow: typeof isNumberBelow;
|
|
133
|
-
NumberBelowOrEqual: typeof isNumberBelowOrEqual;
|
|
134
|
-
Int: typeof isInteger;
|
|
135
|
-
IntBetween: typeof isIntegerBetween;
|
|
136
|
-
IntAbove: typeof isIntegerAbove;
|
|
137
|
-
IntAboveOrEqual: typeof isIntegerAboveOrEqual;
|
|
138
|
-
IntBelow: typeof isIntegerBelow;
|
|
139
|
-
IntBelowOrEqual: typeof isIntegerBelowOrEqual;
|
|
140
|
-
IntGt: typeof isIntegerAbove;
|
|
141
|
-
IntGte: typeof isIntegerAboveOrEqual;
|
|
142
|
-
IntLt: typeof isIntegerBelow;
|
|
143
|
-
IntLte: typeof isIntegerBelowOrEqual;
|
|
144
|
-
Integer: typeof isInteger;
|
|
145
|
-
IntegerBetween: typeof isIntegerBetween;
|
|
146
|
-
IntegerBelow: typeof isIntegerBelow;
|
|
147
|
-
IntegerBelowOrEqual: typeof isIntegerBelowOrEqual;
|
|
148
|
-
IntegerAbove: typeof isIntegerAbove;
|
|
149
|
-
IntegerAboveOrEqual: typeof isIntegerAboveOrEqual;
|
|
150
|
-
RegExp: typeof isRegExp;
|
|
151
|
-
Object: typeof isObject;
|
|
152
|
-
NeObject: typeof isNotEmptyObject;
|
|
153
|
-
NotEmptyObject: typeof isNotEmptyObject;
|
|
154
|
-
String: typeof isString;
|
|
155
|
-
StringBetween: typeof isStringBetween;
|
|
156
|
-
NeString: typeof isNotEmptyString;
|
|
157
|
-
NotEmptyString: typeof isNotEmptyString;
|
|
158
|
-
Equal: typeof equal;
|
|
159
|
-
Eq: typeof equal;
|
|
160
|
-
}>;
|
|
161
|
-
export default Is;
|
|
7
|
+
export { equal, equal as default };
|
|
162
8
|
}
|
|
163
9
|
declare module "hash/fnv1A" {
|
|
164
|
-
|
|
10
|
+
function fnv1A(data: unknown, offset?: number): number;
|
|
11
|
+
export { fnv1A, fnv1A as default };
|
|
165
12
|
}
|
|
166
13
|
declare module "array/dedupe" {
|
|
167
|
-
|
|
14
|
+
function dedupe<T>(val: T[]): T[];
|
|
15
|
+
export { dedupe, dedupe as default };
|
|
16
|
+
}
|
|
17
|
+
declare module "array/is" {
|
|
18
|
+
function isArray(val: unknown): val is unknown[];
|
|
19
|
+
export { isArray, isArray as default };
|
|
20
|
+
}
|
|
21
|
+
declare module "array/isNotEmpty" {
|
|
22
|
+
function isNotEmptyArray(val: unknown): val is unknown[];
|
|
23
|
+
export { isNotEmptyArray, isNotEmptyArray as default };
|
|
168
24
|
}
|
|
169
25
|
declare module "number/round" {
|
|
170
|
-
|
|
26
|
+
function round(val: number, precision?: number): number;
|
|
27
|
+
export { round, round as default };
|
|
171
28
|
}
|
|
172
29
|
declare module "array/join" {
|
|
173
30
|
interface joinOptions {
|
|
@@ -176,24 +33,23 @@ declare module "array/join" {
|
|
|
176
33
|
valtrim?: boolean;
|
|
177
34
|
valround?: number;
|
|
178
35
|
}
|
|
179
|
-
|
|
36
|
+
function join(val: unknown[], opts?: joinOptions): string;
|
|
37
|
+
export { join, join as default };
|
|
180
38
|
}
|
|
181
39
|
declare module "array/mapFn" {
|
|
182
40
|
interface mapOptions {
|
|
183
41
|
merge?: boolean;
|
|
184
42
|
}
|
|
185
|
-
type mapFn = (entry:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
type mapReturn = Record<string, Record<string, any>>;
|
|
189
|
-
export default function mapFn(arr: Record<string, any>[], fn: mapFn, opts?: mapOptions): mapReturn;
|
|
43
|
+
type mapFn<T extends Record<string, any>> = (entry: T) => (string | number | boolean);
|
|
44
|
+
function mapFn<T extends Record<string, any>>(arr: T[], fn: mapFn<T>, opts?: mapOptions): Record<string, T>;
|
|
45
|
+
export { mapFn, mapFn as default };
|
|
190
46
|
}
|
|
191
47
|
declare module "array/mapKey" {
|
|
192
48
|
interface mapOptions {
|
|
193
49
|
merge?: boolean;
|
|
194
50
|
}
|
|
195
|
-
|
|
196
|
-
export
|
|
51
|
+
function mapKey<T extends Record<string, any>>(arr: T[], key: string, opts?: mapOptions): Record<string, T>;
|
|
52
|
+
export { mapKey, mapKey as default };
|
|
197
53
|
}
|
|
198
54
|
declare module "array/mapPrimitive" {
|
|
199
55
|
interface mapOptions {
|
|
@@ -202,10 +58,18 @@ declare module "array/mapPrimitive" {
|
|
|
202
58
|
keyround?: boolean;
|
|
203
59
|
}
|
|
204
60
|
type mapReturn = Record<string, string | number>;
|
|
205
|
-
|
|
61
|
+
function mapPrimitive(arr: unknown[], opts?: mapOptions): mapReturn;
|
|
62
|
+
export { mapPrimitive, mapPrimitive as default };
|
|
206
63
|
}
|
|
207
64
|
declare module "array/shuffle" {
|
|
208
|
-
|
|
65
|
+
function shuffle(arr: unknown[]): void;
|
|
66
|
+
export { shuffle, shuffle as default };
|
|
67
|
+
}
|
|
68
|
+
declare module "object/isNotEmpty" {
|
|
69
|
+
function isNotEmptyObject(val: unknown): val is {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
};
|
|
72
|
+
export { isNotEmptyObject, isNotEmptyObject as default };
|
|
209
73
|
}
|
|
210
74
|
declare module "array/sort" {
|
|
211
75
|
interface sortOptions {
|
|
@@ -217,106 +81,151 @@ declare module "array/sort" {
|
|
|
217
81
|
[key: string]: any;
|
|
218
82
|
}
|
|
219
83
|
type sortByFunction = (el: sortObject) => string;
|
|
220
|
-
|
|
84
|
+
function sort(arr: sortObject[], by: string | sortByFunction, dir?: 'asc' | 'desc', opts?: sortOptions): sortObject[];
|
|
85
|
+
export { sort, sort as default };
|
|
86
|
+
}
|
|
87
|
+
declare module "array/index" {
|
|
88
|
+
import { dedupe } from "array/dedupe";
|
|
89
|
+
import { isArray } from "array/is";
|
|
90
|
+
import { isNotEmptyArray } from "array/isNotEmpty";
|
|
91
|
+
import { join } from "array/join";
|
|
92
|
+
import { mapFn } from "array/mapFn";
|
|
93
|
+
import { mapKey } from "array/mapKey";
|
|
94
|
+
import { mapPrimitive } from "array/mapPrimitive";
|
|
95
|
+
import { shuffle } from "array/shuffle";
|
|
96
|
+
import { sort } from "array/sort";
|
|
97
|
+
export { dedupe, isArray, isArray as is, isNotEmptyArray, isNotEmptyArray as isNotEmpty, isNotEmptyArray as isNeArray, isNotEmptyArray as isNe, join, mapFn, mapKey, mapPrimitive, shuffle, sort };
|
|
221
98
|
}
|
|
222
|
-
declare module "
|
|
223
|
-
|
|
99
|
+
declare module "boolean/is" {
|
|
100
|
+
function isBoolean(val: unknown): val is boolean;
|
|
101
|
+
export { isBoolean, isBoolean as default };
|
|
102
|
+
}
|
|
103
|
+
declare module "boolean/index" {
|
|
104
|
+
import { isBoolean } from "boolean/is";
|
|
105
|
+
export { isBoolean, isBoolean as is };
|
|
106
|
+
}
|
|
107
|
+
declare module "date/is" {
|
|
108
|
+
function isDate(val: unknown): val is Date;
|
|
109
|
+
export { isDate, isDate as default };
|
|
224
110
|
}
|
|
225
111
|
declare module "date/addUTC" {
|
|
226
|
-
|
|
112
|
+
function addUTC(val: Date, amt?: number, key?: 'years' | 'year' | 'months' | 'month' | 'days' | 'day' | 'hours' | 'hour' | 'minutes' | 'minute' | 'seconds' | 'second' | 'milliseconds' | 'millisecond'): Date;
|
|
113
|
+
export { addUTC, addUTC as default };
|
|
227
114
|
}
|
|
228
115
|
declare module "date/diff" {
|
|
229
|
-
|
|
116
|
+
function diff(val_a: Date, val_b: Date, key?: 'week' | 'weeks' | 'day' | 'days' | 'hour' | 'hours' | 'minute' | 'minutes' | 'second' | 'seconds' | 'millisecond' | 'milliseconds'): number;
|
|
117
|
+
export { diff, diff as default };
|
|
230
118
|
}
|
|
231
119
|
declare module "date/endOfUTC" {
|
|
232
|
-
|
|
120
|
+
function endOfUTC(val: Date, key?: 'year' | 'quarter' | 'month' | 'week' | 'week_sun' | 'week_mon' | 'week_tue' | 'week_wed' | 'week_thu' | 'week_fri' | 'week_sat' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond'): Date;
|
|
121
|
+
export { endOfUTC, endOfUTC as default };
|
|
233
122
|
}
|
|
234
123
|
declare module "date/format" {
|
|
235
|
-
|
|
124
|
+
function format(val: Date, spec: string, locale?: string, zone?: string): string;
|
|
125
|
+
export { format, format as default };
|
|
236
126
|
}
|
|
237
127
|
declare module "date/nowUnix" {
|
|
238
|
-
|
|
128
|
+
function nowUnix(): number;
|
|
129
|
+
export { nowUnix, nowUnix as default };
|
|
239
130
|
}
|
|
240
131
|
declare module "date/nowUnixMs" {
|
|
241
|
-
|
|
132
|
+
function nowUnixMs(): number;
|
|
133
|
+
export { nowUnixMs, nowUnixMs as default };
|
|
242
134
|
}
|
|
243
135
|
declare module "date/startOfUTC" {
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
declare module "date/toUTC" {
|
|
247
|
-
export default function toUTC(val: Date): Date;
|
|
136
|
+
function startOfUTC(val: Date, key?: 'year' | 'quarter' | 'month' | 'week' | 'week_sun' | 'week_mon' | 'week_tue' | 'week_wed' | 'week_thu' | 'week_fri' | 'week_sat' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond'): Date;
|
|
137
|
+
export { startOfUTC, startOfUTC as default };
|
|
248
138
|
}
|
|
249
139
|
declare module "date/toUnix" {
|
|
250
|
-
|
|
140
|
+
function toUnix(val: Date): number;
|
|
141
|
+
export { toUnix, toUnix as default };
|
|
251
142
|
}
|
|
252
|
-
declare module "
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
143
|
+
declare module "date/toUTC" {
|
|
144
|
+
function toUTC(val: Date): Date;
|
|
145
|
+
export { toUTC, toUTC as default };
|
|
146
|
+
}
|
|
147
|
+
declare module "date/index" {
|
|
148
|
+
import { addUTC } from "date/addUTC";
|
|
149
|
+
import { diff } from "date/diff";
|
|
150
|
+
import { endOfUTC } from "date/endOfUTC";
|
|
151
|
+
import { format } from "date/format";
|
|
152
|
+
import { isDate } from "date/is";
|
|
153
|
+
import { nowUnix } from "date/nowUnix";
|
|
154
|
+
import { nowUnixMs } from "date/nowUnixMs";
|
|
155
|
+
import { startOfUTC } from "date/startOfUTC";
|
|
156
|
+
import { toUnix } from "date/toUnix";
|
|
157
|
+
import { toUTC } from "date/toUTC";
|
|
158
|
+
export { addUTC, diff, endOfUTC, format, isDate, isDate as is, nowUnix, nowUnixMs, startOfUTC, toUnix, toUTC };
|
|
159
|
+
}
|
|
160
|
+
declare module "formdata/is" {
|
|
161
|
+
function isFormData(val: unknown): val is FormData;
|
|
162
|
+
export { isFormData, isFormData as default };
|
|
163
|
+
}
|
|
164
|
+
declare module "formdata/index" {
|
|
165
|
+
import { isFormData } from "formdata/is";
|
|
166
|
+
export { isFormData, isFormData as is };
|
|
269
167
|
}
|
|
270
|
-
declare module "
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
} | {
|
|
274
|
-
[key: string]: any;
|
|
275
|
-
}[] | any[];
|
|
276
|
-
type Sealed<T> = {
|
|
277
|
-
[K in keyof T]: Sealed<T[K]>;
|
|
278
|
-
};
|
|
279
|
-
export default function deepSeal<T extends deepInput>(obj: T): Sealed<T>;
|
|
168
|
+
declare module "function/is" {
|
|
169
|
+
function isFunction(val: unknown): val is (...args: unknown[]) => unknown;
|
|
170
|
+
export { isFunction, isFunction as default };
|
|
280
171
|
}
|
|
281
|
-
declare module "
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
} | {
|
|
285
|
-
[key: string]: any;
|
|
286
|
-
}[] | any[], path: string, value: any, define?: boolean): boolean;
|
|
172
|
+
declare module "function/isAsync" {
|
|
173
|
+
function isAsyncFunction(val: unknown): val is (...args: unknown[]) => Promise<unknown>;
|
|
174
|
+
export { isAsyncFunction, isAsyncFunction as default };
|
|
287
175
|
}
|
|
288
176
|
declare module "function/noop" {
|
|
289
|
-
|
|
177
|
+
function noop(): void;
|
|
178
|
+
export { noop, noop as default };
|
|
290
179
|
}
|
|
291
180
|
declare module "function/noopresolve" {
|
|
292
|
-
|
|
181
|
+
function noopresolve<T>(val?: T): Promise<T>;
|
|
182
|
+
export { noopresolve, noopresolve as default };
|
|
293
183
|
}
|
|
294
184
|
declare module "function/noopreturn" {
|
|
295
|
-
|
|
185
|
+
function noopreturn<T>(val?: T): T;
|
|
186
|
+
export { noopreturn, noopreturn as default };
|
|
296
187
|
}
|
|
297
188
|
declare module "function/sleep" {
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
189
|
+
function sleep(ms?: number): Promise<void>;
|
|
190
|
+
export { sleep, sleep as default };
|
|
191
|
+
}
|
|
192
|
+
declare module "function/index" {
|
|
193
|
+
import { isFunction } from "function/is";
|
|
194
|
+
import { isAsyncFunction } from "function/isAsync";
|
|
195
|
+
import { noop } from "function/noop";
|
|
196
|
+
import { noopresolve } from "function/noopresolve";
|
|
197
|
+
import { noopreturn } from "function/noopreturn";
|
|
198
|
+
import { sleep } from "function/sleep";
|
|
199
|
+
export { isFunction, isFunction as is, isFunction as isFn, isAsyncFunction, isAsyncFunction as isAsync, isAsyncFunction as isAsyncFn, noop, noopresolve, noopreturn, sleep };
|
|
302
200
|
}
|
|
303
|
-
declare module "
|
|
304
|
-
|
|
201
|
+
declare module "regexp/is" {
|
|
202
|
+
function isRegExp(val: unknown): val is RegExp;
|
|
203
|
+
export { isRegExp, isRegExp as default };
|
|
305
204
|
}
|
|
306
|
-
declare module "
|
|
307
|
-
|
|
205
|
+
declare module "regexp/sanitize" {
|
|
206
|
+
function sanitizeRegExp(val: string): string | false;
|
|
207
|
+
export { sanitizeRegExp, sanitizeRegExp as default };
|
|
308
208
|
}
|
|
309
|
-
declare module "
|
|
310
|
-
|
|
209
|
+
declare module "regexp/index" {
|
|
210
|
+
import { isRegExp } from "regexp/is";
|
|
211
|
+
import { sanitizeRegExp } from "regexp/sanitize";
|
|
212
|
+
export { isRegExp, isRegExp as is, sanitizeRegExp, sanitizeRegExp as sanitize };
|
|
311
213
|
}
|
|
312
214
|
declare module "object/define" {
|
|
313
|
-
|
|
215
|
+
function define(props: {
|
|
314
216
|
[key: string]: any;
|
|
315
217
|
}, obj?: {
|
|
316
218
|
[key: string]: any;
|
|
317
219
|
}): {
|
|
318
220
|
[key: string]: any;
|
|
319
221
|
};
|
|
222
|
+
export { define, define as default };
|
|
223
|
+
}
|
|
224
|
+
declare module "object/is" {
|
|
225
|
+
function isObject(val: unknown): val is {
|
|
226
|
+
[key: string]: any;
|
|
227
|
+
};
|
|
228
|
+
export { isObject, isObject as default };
|
|
320
229
|
}
|
|
321
230
|
declare module "object/merge" {
|
|
322
231
|
function merge(target: {
|
|
@@ -326,17 +235,119 @@ declare module "object/merge" {
|
|
|
326
235
|
}): {
|
|
327
236
|
[key: string]: any;
|
|
328
237
|
};
|
|
329
|
-
export default
|
|
238
|
+
export { merge, merge as default };
|
|
239
|
+
}
|
|
240
|
+
declare module "deep/get" {
|
|
241
|
+
function deepGet(obj: {
|
|
242
|
+
[key: string]: any;
|
|
243
|
+
} | {
|
|
244
|
+
[key: string]: any;
|
|
245
|
+
}[] | any[], path: string, get_parent?: boolean): any | undefined;
|
|
246
|
+
export { deepGet, deepGet as default };
|
|
247
|
+
}
|
|
248
|
+
declare module "deep/set" {
|
|
249
|
+
function deepSet(obj: {
|
|
250
|
+
[key: string]: any;
|
|
251
|
+
} | {
|
|
252
|
+
[key: string]: any;
|
|
253
|
+
}[] | any[], path: string, value: any, define?: boolean): boolean;
|
|
254
|
+
export { deepSet, deepSet as default };
|
|
330
255
|
}
|
|
331
256
|
declare module "object/pick" {
|
|
332
|
-
|
|
257
|
+
function pick(obj: {
|
|
333
258
|
[key: string]: any;
|
|
334
259
|
}, keys: string[]): {
|
|
335
260
|
[key: string]: any;
|
|
336
261
|
};
|
|
262
|
+
export { pick, pick as default };
|
|
337
263
|
}
|
|
338
|
-
declare module "
|
|
339
|
-
|
|
264
|
+
declare module "object/index" {
|
|
265
|
+
import { define } from "object/define";
|
|
266
|
+
import { isObject } from "object/is";
|
|
267
|
+
import { isNotEmptyObject } from "object/isNotEmpty";
|
|
268
|
+
import { merge } from "object/merge";
|
|
269
|
+
import { pick } from "object/pick";
|
|
270
|
+
export { define, isObject, isObject as is, isNotEmptyObject, isNotEmptyObject as isNotEmpty, isNotEmptyObject as isNeObject, isNotEmptyObject as isNe, merge, pick };
|
|
271
|
+
}
|
|
272
|
+
declare module "number/is" {
|
|
273
|
+
function isNumber(val: unknown): val is number;
|
|
274
|
+
export { isNumber, isNumber as default };
|
|
275
|
+
}
|
|
276
|
+
declare module "number/isAbove" {
|
|
277
|
+
function isNumberAbove(val: unknown, ref: number): val is number;
|
|
278
|
+
export { isNumberAbove, isNumberAbove as default };
|
|
279
|
+
}
|
|
280
|
+
declare module "number/isAboveOrEqual" {
|
|
281
|
+
function isNumberAboveOrEqual(val: unknown, ref: number): val is number;
|
|
282
|
+
export { isNumberAboveOrEqual, isNumberAboveOrEqual as default };
|
|
283
|
+
}
|
|
284
|
+
declare module "number/isBelow" {
|
|
285
|
+
function isNumberBelow(val: unknown, ref: number): val is number;
|
|
286
|
+
export { isNumberBelow, isNumberBelow as default };
|
|
287
|
+
}
|
|
288
|
+
declare module "number/isBelowOrEqual" {
|
|
289
|
+
function isNumberBelowOrEqual(val: unknown, ref: number): val is number;
|
|
290
|
+
export { isNumberBelowOrEqual, isNumberBelowOrEqual as default };
|
|
291
|
+
}
|
|
292
|
+
declare module "number/isBetween" {
|
|
293
|
+
function isNumberBetween(val: unknown, min: number, max: number): val is number;
|
|
294
|
+
export { isNumberBetween, isNumberBetween as default };
|
|
295
|
+
}
|
|
296
|
+
declare module "number/isInteger" {
|
|
297
|
+
function isInteger(val: unknown): val is number;
|
|
298
|
+
export { isInteger, isInteger as default };
|
|
299
|
+
}
|
|
300
|
+
declare module "number/isIntegerAbove" {
|
|
301
|
+
function isIntegerAbove(val: unknown, ref: number): val is number;
|
|
302
|
+
export { isIntegerAbove, isIntegerAbove as default };
|
|
303
|
+
}
|
|
304
|
+
declare module "number/isIntegerAboveOrEqual" {
|
|
305
|
+
function isIntegerAboveOrEqual(val: unknown, ref: number): val is number;
|
|
306
|
+
export { isIntegerAboveOrEqual, isIntegerAboveOrEqual as default };
|
|
307
|
+
}
|
|
308
|
+
declare module "number/isIntegerBelow" {
|
|
309
|
+
function isIntegerBelow(val: unknown, ref: number): val is number;
|
|
310
|
+
export { isIntegerBelow, isIntegerBelow as default };
|
|
311
|
+
}
|
|
312
|
+
declare module "number/isIntegerBelowOrEqual" {
|
|
313
|
+
function isIntegerBelowOrEqual(val: unknown, ref: number): val is number;
|
|
314
|
+
export { isIntegerBelowOrEqual, isIntegerBelowOrEqual as default };
|
|
315
|
+
}
|
|
316
|
+
declare module "number/isIntegerBetween" {
|
|
317
|
+
function isIntegerBetween(val: unknown, min: number, max: number): val is number;
|
|
318
|
+
export { isIntegerBetween, isIntegerBetween as default };
|
|
319
|
+
}
|
|
320
|
+
declare module "number/randomBetween" {
|
|
321
|
+
function randomBetween(min?: number, max?: number): number;
|
|
322
|
+
export { randomBetween, randomBetween as default };
|
|
323
|
+
}
|
|
324
|
+
declare module "number/randomIntBetween" {
|
|
325
|
+
function randomIntBetween(min?: number, max?: number): number;
|
|
326
|
+
export { randomIntBetween, randomIntBetween as default };
|
|
327
|
+
}
|
|
328
|
+
declare module "number/toPercentage" {
|
|
329
|
+
function toPercentage(val: number, precision?: number, min?: number, max?: number): number;
|
|
330
|
+
export { toPercentage, toPercentage as default };
|
|
331
|
+
}
|
|
332
|
+
declare module "number/index" {
|
|
333
|
+
import { isNumber } from "number/is";
|
|
334
|
+
import { isNumberAbove } from "number/isAbove";
|
|
335
|
+
import { isNumberAboveOrEqual } from "number/isAboveOrEqual";
|
|
336
|
+
import { isNumberBelow } from "number/isBelow";
|
|
337
|
+
import { isNumberBelowOrEqual } from "number/isBelowOrEqual";
|
|
338
|
+
import { isNumberBetween } from "number/isBetween";
|
|
339
|
+
import { isInteger } from "number/isInteger";
|
|
340
|
+
import { isIntegerAbove } from "number/isIntegerAbove";
|
|
341
|
+
import { isIntegerAboveOrEqual } from "number/isIntegerAboveOrEqual";
|
|
342
|
+
import { isIntegerBelow } from "number/isIntegerBelow";
|
|
343
|
+
import { isIntegerBelowOrEqual } from "number/isIntegerBelowOrEqual";
|
|
344
|
+
import { isIntegerBetween } from "number/isIntegerBetween";
|
|
345
|
+
import { isNumericalNaN } from "number/isNumericalNaN";
|
|
346
|
+
import { randomBetween } from "number/randomBetween";
|
|
347
|
+
import { randomIntBetween } from "number/randomIntBetween";
|
|
348
|
+
import { round } from "number/round";
|
|
349
|
+
import { toPercentage } from "number/toPercentage";
|
|
350
|
+
export { isNumber, isNumber as is, isNumber as isNum, isNumberAbove, isNumberAbove as isNumGt, isNumberAbove as isGt, isNumberAboveOrEqual, isNumberAboveOrEqual as isNumGte, isNumberAboveOrEqual as isGte, isNumberBelow, isNumberBelow as isNumLt, isNumberBelow as isLt, isNumberBelowOrEqual, isNumberBelowOrEqual as isNumLte, isNumberBelowOrEqual as isLte, isNumberBetween, isNumberBetween as isNumBetween, isInteger, isInteger as isInt, isIntegerAbove, isIntegerAbove as isIntGt, isIntegerAboveOrEqual, isIntegerAboveOrEqual as isIntGte, isIntegerBelow, isIntegerBelow as isIntLt, isIntegerBelowOrEqual, isIntegerBelowOrEqual as isIntLte, isIntegerBetween, isIntegerBetween as isIntBetween, isNumericalNaN, randomBetween, randomBetween as randBetween, randomIntBetween, randomIntBetween as randIntBetween, round, toPercentage, toPercentage as toPct };
|
|
340
351
|
}
|
|
341
352
|
declare module "string/humanizeNumber" {
|
|
342
353
|
interface humanizeNumberOptions {
|
|
@@ -347,7 +358,8 @@ declare module "string/humanizeNumber" {
|
|
|
347
358
|
divider?: number;
|
|
348
359
|
real?: boolean;
|
|
349
360
|
}
|
|
350
|
-
|
|
361
|
+
function humanizeNumber(val: number | string, options?: humanizeNumberOptions | false): string;
|
|
362
|
+
export { humanizeNumber, humanizeNumber as default };
|
|
351
363
|
}
|
|
352
364
|
declare module "string/humanizeBytes" {
|
|
353
365
|
interface humanizeBytesOptions {
|
|
@@ -356,8 +368,144 @@ declare module "string/humanizeBytes" {
|
|
|
356
368
|
precision?: number;
|
|
357
369
|
units?: string[];
|
|
358
370
|
}
|
|
359
|
-
|
|
371
|
+
function humanizeBytes(val: number | string, options?: humanizeBytesOptions): string;
|
|
372
|
+
export { humanizeBytes, humanizeBytes as default };
|
|
373
|
+
}
|
|
374
|
+
declare module "string/is" {
|
|
375
|
+
function isString(val: unknown): val is string;
|
|
376
|
+
export { isString, isString as default };
|
|
377
|
+
}
|
|
378
|
+
declare module "string/isNotEmpty" {
|
|
379
|
+
function isNotEmptyString(val: unknown, trimmed?: boolean): val is string;
|
|
380
|
+
export { isNotEmptyString, isNotEmptyString as default };
|
|
381
|
+
}
|
|
382
|
+
declare module "string/isBetween" {
|
|
383
|
+
function isStringBetween(val: unknown, min: number, max: number, trimmed?: boolean): val is string;
|
|
384
|
+
export { isStringBetween, isStringBetween as default };
|
|
360
385
|
}
|
|
361
386
|
declare module "string/shorten" {
|
|
362
|
-
|
|
387
|
+
function shorten(val: string, length: number, postfix?: string): string;
|
|
388
|
+
export { shorten, shorten as default };
|
|
389
|
+
}
|
|
390
|
+
declare module "string/index" {
|
|
391
|
+
import { humanizeBytes } from "string/humanizeBytes";
|
|
392
|
+
import { humanizeNumber } from "string/humanizeNumber";
|
|
393
|
+
import { isString } from "string/is";
|
|
394
|
+
import { isNotEmptyString } from "string/isNotEmpty";
|
|
395
|
+
import { isStringBetween } from "string/isBetween";
|
|
396
|
+
import { shorten } from "string/shorten";
|
|
397
|
+
export { humanizeBytes, humanizeNumber, isString, isString as is, isNotEmptyString, isNotEmptyString as isNotEmpty, isNotEmptyString as isNeString, isNotEmptyString as isNe, isStringBetween, isStringBetween as isBetween, shorten };
|
|
398
|
+
}
|
|
399
|
+
declare module "is" {
|
|
400
|
+
import { equal } from "equal";
|
|
401
|
+
import { isArray, isNeArray } from "array/index";
|
|
402
|
+
import { isBoolean } from "boolean/index";
|
|
403
|
+
import { isDate } from "date/index";
|
|
404
|
+
import { isFormData } from "formdata/index";
|
|
405
|
+
import { isFn, isAsyncFn } from "function/index";
|
|
406
|
+
import { isRegExp } from "regexp/index";
|
|
407
|
+
import { isObject, isNeObject } from "object/index";
|
|
408
|
+
import { isNum, isNumBetween, isNumLt, isNumLte, isNumGt, isNumGte, isInt, isIntBetween, isIntLt, isIntLte, isIntGt, isIntGte } from "number/index";
|
|
409
|
+
import { isString, isStringBetween, isNeString } from "string/index";
|
|
410
|
+
const Is: Readonly<{
|
|
411
|
+
Array: typeof isArray;
|
|
412
|
+
NeArray: typeof isNeArray;
|
|
413
|
+
NotEmptyArray: typeof isNeArray;
|
|
414
|
+
Boolean: typeof isBoolean;
|
|
415
|
+
Date: typeof isDate;
|
|
416
|
+
Formdata: typeof isFormData;
|
|
417
|
+
Function: typeof isFn;
|
|
418
|
+
AsyncFunction: typeof isAsyncFn;
|
|
419
|
+
Num: typeof isNum;
|
|
420
|
+
NumBetween: typeof isNumBetween;
|
|
421
|
+
NumAbove: typeof isNumGt;
|
|
422
|
+
NumAboveOrEqual: typeof isNumGte;
|
|
423
|
+
NumBelow: typeof isNumLt;
|
|
424
|
+
NumBelowOrEqual: typeof isNumLte;
|
|
425
|
+
NumGt: typeof isNumGt;
|
|
426
|
+
NumGte: typeof isNumGte;
|
|
427
|
+
NumLt: typeof isNumLt;
|
|
428
|
+
NumLte: typeof isNumLte;
|
|
429
|
+
Number: typeof isNum;
|
|
430
|
+
NumberBetween: typeof isNumBetween;
|
|
431
|
+
NumberAbove: typeof isNumGt;
|
|
432
|
+
NumberAboveOrEqual: typeof isNumGte;
|
|
433
|
+
NumberBelow: typeof isNumLt;
|
|
434
|
+
NumberBelowOrEqual: typeof isNumLte;
|
|
435
|
+
Int: typeof isInt;
|
|
436
|
+
IntBetween: typeof isIntBetween;
|
|
437
|
+
IntAbove: typeof isIntGt;
|
|
438
|
+
IntAboveOrEqual: typeof isIntGte;
|
|
439
|
+
IntBelow: typeof isIntLt;
|
|
440
|
+
IntBelowOrEqual: typeof isIntLte;
|
|
441
|
+
IntGt: typeof isIntGt;
|
|
442
|
+
IntGte: typeof isIntGte;
|
|
443
|
+
IntLt: typeof isIntLt;
|
|
444
|
+
IntLte: typeof isIntLte;
|
|
445
|
+
Integer: typeof isInt;
|
|
446
|
+
IntegerBetween: typeof isIntBetween;
|
|
447
|
+
IntegerBelow: typeof isIntLt;
|
|
448
|
+
IntegerBelowOrEqual: typeof isIntLte;
|
|
449
|
+
IntegerAbove: typeof isIntGt;
|
|
450
|
+
IntegerAboveOrEqual: typeof isIntGte;
|
|
451
|
+
RegExp: typeof isRegExp;
|
|
452
|
+
Object: typeof isObject;
|
|
453
|
+
NeObject: typeof isNeObject;
|
|
454
|
+
NotEmptyObject: typeof isNeObject;
|
|
455
|
+
String: typeof isString;
|
|
456
|
+
StringBetween: typeof isStringBetween;
|
|
457
|
+
NeString: typeof isNeString;
|
|
458
|
+
NotEmptyString: typeof isNeString;
|
|
459
|
+
Equal: typeof equal;
|
|
460
|
+
Eq: typeof equal;
|
|
461
|
+
}>;
|
|
462
|
+
export { Is, Is as default };
|
|
463
|
+
}
|
|
464
|
+
declare module "caching/memoize" {
|
|
465
|
+
function memoize(fn: Function, resolver?: Function): Function;
|
|
466
|
+
export { memoize, memoize as default };
|
|
467
|
+
}
|
|
468
|
+
declare module "caching/index" {
|
|
469
|
+
import { memoize } from "caching/memoize";
|
|
470
|
+
export { memoize };
|
|
471
|
+
}
|
|
472
|
+
declare module "deep/freeze" {
|
|
473
|
+
type deepInput = {
|
|
474
|
+
[key: string]: any;
|
|
475
|
+
} | {
|
|
476
|
+
[key: string]: any;
|
|
477
|
+
}[] | any[];
|
|
478
|
+
type Frozen<T> = {
|
|
479
|
+
readonly [K in keyof T]: Frozen<T[K]>;
|
|
480
|
+
};
|
|
481
|
+
function deepFreeze<T extends deepInput>(obj: T): Frozen<T>;
|
|
482
|
+
export { deepFreeze, deepFreeze as default };
|
|
483
|
+
}
|
|
484
|
+
declare module "deep/seal" {
|
|
485
|
+
type deepInput = {
|
|
486
|
+
[key: string]: any;
|
|
487
|
+
} | {
|
|
488
|
+
[key: string]: any;
|
|
489
|
+
}[] | any[];
|
|
490
|
+
type Sealed<T> = {
|
|
491
|
+
[K in keyof T]: Sealed<T[K]>;
|
|
492
|
+
};
|
|
493
|
+
function deepSeal<T extends deepInput>(obj: T): Sealed<T>;
|
|
494
|
+
export { deepSeal, deepSeal as default };
|
|
495
|
+
}
|
|
496
|
+
declare module "deep/index" {
|
|
497
|
+
import { deepFreeze } from "deep/freeze";
|
|
498
|
+
import { deepGet } from "deep/get";
|
|
499
|
+
import { deepSeal } from "deep/seal";
|
|
500
|
+
import { deepSet } from "deep/set";
|
|
501
|
+
export { deepFreeze as freeze, deepFreeze, deepGet as get, deepGet, deepSeal as seal, deepSeal, deepSet as set, deepSet };
|
|
502
|
+
}
|
|
503
|
+
declare module "hash/guid" {
|
|
504
|
+
function guid(): string;
|
|
505
|
+
export { guid, guid as default };
|
|
506
|
+
}
|
|
507
|
+
declare module "hash/index" {
|
|
508
|
+
import { fnv1A } from "hash/fnv1A";
|
|
509
|
+
import { guid } from "hash/guid";
|
|
510
|
+
export { fnv1A, guid };
|
|
363
511
|
}
|