@valkyriestudios/utils 12.4.0 → 12.6.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 +68 -4
- package/dist/array/groupBy.d.ts +3 -0
- package/dist/array/groupBy.js +34 -0
- package/dist/array/index.d.ts +11 -0
- package/dist/array/index.js +27 -0
- package/dist/boolean/index.d.ts +2 -0
- package/dist/boolean/index.js +6 -0
- package/dist/caching/index.d.ts +2 -0
- package/dist/caching/index.js +5 -0
- package/dist/date/index.d.ts +11 -0
- package/dist/date/index.js +24 -0
- package/dist/deep/index.d.ts +5 -0
- package/dist/deep/index.js +15 -0
- package/dist/formdata/index.d.ts +2 -0
- package/dist/formdata/index.js +6 -0
- package/dist/formdata/is.d.ts +9 -0
- package/dist/formdata/is.js +8 -0
- package/dist/function/index.d.ts +7 -0
- package/dist/function/index.js +19 -0
- package/dist/hash/index.d.ts +3 -0
- package/dist/hash/index.js +7 -0
- package/{index.d.ts → dist/index.d.ts} +332 -236
- package/dist/is.d.ts +63 -0
- package/dist/is.js +67 -0
- package/dist/number/index.d.ts +18 -0
- package/dist/number/index.js +57 -0
- package/dist/object/index.d.ts +6 -0
- package/dist/object/index.js +17 -0
- package/{object → dist/object}/isNotEmpty.js +1 -1
- package/dist/regexp/index.d.ts +3 -0
- package/dist/regexp/index.js +9 -0
- package/dist/string/index.d.ts +7 -0
- package/dist/string/index.js +20 -0
- package/package.json +47 -1
- package/publish.sh +27 -0
- package/is.d.ts +0 -77
- package/is.js +0 -81
- /package/{array → dist/array}/dedupe.d.ts +0 -0
- /package/{array → dist/array}/dedupe.js +0 -0
- /package/{array → dist/array}/is.d.ts +0 -0
- /package/{array → dist/array}/is.js +0 -0
- /package/{array → dist/array}/isNotEmpty.d.ts +0 -0
- /package/{array → dist/array}/isNotEmpty.js +0 -0
- /package/{array → dist/array}/join.d.ts +0 -0
- /package/{array → dist/array}/join.js +0 -0
- /package/{array → dist/array}/mapFn.d.ts +0 -0
- /package/{array → dist/array}/mapFn.js +0 -0
- /package/{array → dist/array}/mapKey.d.ts +0 -0
- /package/{array → dist/array}/mapKey.js +0 -0
- /package/{array → dist/array}/mapPrimitive.d.ts +0 -0
- /package/{array → dist/array}/mapPrimitive.js +0 -0
- /package/{array → dist/array}/shuffle.d.ts +0 -0
- /package/{array → dist/array}/shuffle.js +0 -0
- /package/{array → dist/array}/sort.d.ts +0 -0
- /package/{array → dist/array}/sort.js +0 -0
- /package/{boolean → dist/boolean}/is.d.ts +0 -0
- /package/{boolean → dist/boolean}/is.js +0 -0
- /package/{caching → dist/caching}/memoize.d.ts +0 -0
- /package/{caching → dist/caching}/memoize.js +0 -0
- /package/{date → dist/date}/addUTC.d.ts +0 -0
- /package/{date → dist/date}/addUTC.js +0 -0
- /package/{date → dist/date}/diff.d.ts +0 -0
- /package/{date → dist/date}/diff.js +0 -0
- /package/{date → dist/date}/endOfUTC.d.ts +0 -0
- /package/{date → dist/date}/endOfUTC.js +0 -0
- /package/{date → dist/date}/format.d.ts +0 -0
- /package/{date → dist/date}/format.js +0 -0
- /package/{date → dist/date}/is.d.ts +0 -0
- /package/{date → dist/date}/is.js +0 -0
- /package/{date → dist/date}/nowUnix.d.ts +0 -0
- /package/{date → dist/date}/nowUnix.js +0 -0
- /package/{date → dist/date}/nowUnixMs.d.ts +0 -0
- /package/{date → dist/date}/nowUnixMs.js +0 -0
- /package/{date → dist/date}/startOfUTC.d.ts +0 -0
- /package/{date → dist/date}/startOfUTC.js +0 -0
- /package/{date → dist/date}/toUTC.d.ts +0 -0
- /package/{date → dist/date}/toUTC.js +0 -0
- /package/{date → dist/date}/toUnix.d.ts +0 -0
- /package/{date → dist/date}/toUnix.js +0 -0
- /package/{deep → dist/deep}/freeze.d.ts +0 -0
- /package/{deep → dist/deep}/freeze.js +0 -0
- /package/{deep → dist/deep}/get.d.ts +0 -0
- /package/{deep → dist/deep}/get.js +0 -0
- /package/{deep → dist/deep}/seal.d.ts +0 -0
- /package/{deep → dist/deep}/seal.js +0 -0
- /package/{deep → dist/deep}/set.d.ts +0 -0
- /package/{deep → dist/deep}/set.js +0 -0
- /package/{equal.d.ts → dist/equal.d.ts} +0 -0
- /package/{equal.js → dist/equal.js} +0 -0
- /package/{function → dist/function}/is.d.ts +0 -0
- /package/{function → dist/function}/is.js +0 -0
- /package/{function → dist/function}/isAsync.d.ts +0 -0
- /package/{function → dist/function}/isAsync.js +0 -0
- /package/{function → dist/function}/noop.d.ts +0 -0
- /package/{function → dist/function}/noop.js +0 -0
- /package/{function → dist/function}/noopresolve.d.ts +0 -0
- /package/{function → dist/function}/noopresolve.js +0 -0
- /package/{function → dist/function}/noopreturn.d.ts +0 -0
- /package/{function → dist/function}/noopreturn.js +0 -0
- /package/{function → dist/function}/sleep.d.ts +0 -0
- /package/{function → dist/function}/sleep.js +0 -0
- /package/{hash → dist/hash}/fnv1A.d.ts +0 -0
- /package/{hash → dist/hash}/fnv1A.js +0 -0
- /package/{hash → dist/hash}/guid.d.ts +0 -0
- /package/{hash → dist/hash}/guid.js +0 -0
- /package/{number → dist/number}/is.d.ts +0 -0
- /package/{number → dist/number}/is.js +0 -0
- /package/{number → dist/number}/isAbove.d.ts +0 -0
- /package/{number → dist/number}/isAbove.js +0 -0
- /package/{number → dist/number}/isAboveOrEqual.d.ts +0 -0
- /package/{number → dist/number}/isAboveOrEqual.js +0 -0
- /package/{number → dist/number}/isBelow.d.ts +0 -0
- /package/{number → dist/number}/isBelow.js +0 -0
- /package/{number → dist/number}/isBelowOrEqual.d.ts +0 -0
- /package/{number → dist/number}/isBelowOrEqual.js +0 -0
- /package/{number → dist/number}/isBetween.d.ts +0 -0
- /package/{number → dist/number}/isBetween.js +0 -0
- /package/{number → dist/number}/isInteger.d.ts +0 -0
- /package/{number → dist/number}/isInteger.js +0 -0
- /package/{number → dist/number}/isIntegerAbove.d.ts +0 -0
- /package/{number → dist/number}/isIntegerAbove.js +0 -0
- /package/{number → dist/number}/isIntegerAboveOrEqual.d.ts +0 -0
- /package/{number → dist/number}/isIntegerAboveOrEqual.js +0 -0
- /package/{number → dist/number}/isIntegerBelow.d.ts +0 -0
- /package/{number → dist/number}/isIntegerBelow.js +0 -0
- /package/{number → dist/number}/isIntegerBelowOrEqual.d.ts +0 -0
- /package/{number → dist/number}/isIntegerBelowOrEqual.js +0 -0
- /package/{number → dist/number}/isIntegerBetween.d.ts +0 -0
- /package/{number → dist/number}/isIntegerBetween.js +0 -0
- /package/{number → dist/number}/isNumericalNaN.d.ts +0 -0
- /package/{number → dist/number}/isNumericalNaN.js +0 -0
- /package/{number → dist/number}/randomBetween.d.ts +0 -0
- /package/{number → dist/number}/randomBetween.js +0 -0
- /package/{number → dist/number}/randomIntBetween.d.ts +0 -0
- /package/{number → dist/number}/randomIntBetween.js +0 -0
- /package/{number → dist/number}/round.d.ts +0 -0
- /package/{number → dist/number}/round.js +0 -0
- /package/{number → dist/number}/toPercentage.d.ts +0 -0
- /package/{number → dist/number}/toPercentage.js +0 -0
- /package/{object → dist/object}/define.d.ts +0 -0
- /package/{object → dist/object}/define.js +0 -0
- /package/{object → dist/object}/is.d.ts +0 -0
- /package/{object → dist/object}/is.js +0 -0
- /package/{object → dist/object}/isNotEmpty.d.ts +0 -0
- /package/{object → dist/object}/merge.d.ts +0 -0
- /package/{object → dist/object}/merge.js +0 -0
- /package/{object → dist/object}/pick.d.ts +0 -0
- /package/{object → dist/object}/pick.js +0 -0
- /package/{regexp → dist/regexp}/is.d.ts +0 -0
- /package/{regexp → dist/regexp}/is.js +0 -0
- /package/{regexp → dist/regexp}/sanitize.d.ts +0 -0
- /package/{regexp → dist/regexp}/sanitize.js +0 -0
- /package/{string → dist/string}/humanizeBytes.d.ts +0 -0
- /package/{string → dist/string}/humanizeBytes.js +0 -0
- /package/{string → dist/string}/humanizeNumber.d.ts +0 -0
- /package/{string → dist/string}/humanizeNumber.js +0 -0
- /package/{string → dist/string}/is.d.ts +0 -0
- /package/{string → dist/string}/is.js +0 -0
- /package/{string → dist/string}/isBetween.d.ts +0 -0
- /package/{string → dist/string}/isBetween.js +0 -0
- /package/{string → dist/string}/isNotEmpty.d.ts +0 -0
- /package/{string → dist/string}/isNotEmpty.js +0 -0
- /package/{string → dist/string}/shorten.d.ts +0 -0
- /package/{string → dist/string}/shorten.js +0 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ isNotEmptyArray([]); // FALSE
|
|
|
30
30
|
isNotEmptyArray([0, 1, 2]); // TRUE
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
- **mapKey(val:
|
|
33
|
+
- **mapKey(val:Record[], key:string, opts:object={})**
|
|
34
34
|
Map a non-primitive object array into an object map by key
|
|
35
35
|
```js
|
|
36
36
|
mapKey([
|
|
@@ -99,7 +99,7 @@ output:
|
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
- **mapFn(val:
|
|
102
|
+
- **mapFn(val:Record[], key:Function, opts:object={})**
|
|
103
103
|
Same behavior as mapKey but instead of a key, a function is passed to generate your own key. Eg:
|
|
104
104
|
|
|
105
105
|
```js
|
|
@@ -120,7 +120,7 @@ output:
|
|
|
120
120
|
|
|
121
121
|
options are the same as the mapKey function
|
|
122
122
|
|
|
123
|
-
- **mapPrimitive(val:any, opts:object={valtrim:false,keyround:false,valround:false})**
|
|
123
|
+
- **mapPrimitive(val:any[], opts:object={valtrim:false,keyround:false,valround:false})**
|
|
124
124
|
Map an array of primitives (number/string)
|
|
125
125
|
```js
|
|
126
126
|
mapPrimitive([1,2,3]); // {1: 1, 2: 2, 3: 3}
|
|
@@ -128,6 +128,62 @@ mapPrimitive(['hello', 'hello', 'foo', 'bar']); // {hello: 'hello', foo: 'foo',
|
|
|
128
128
|
mapPrimitive(['hello', ' hello', 'foo', ' foo'], {valtrim: true}); // {hello: 'hello', foo: 'foo'}
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
- **groupBy(val:Record[], handler:Function|string)**
|
|
132
|
+
Return a grouped object from an array. This function **will automatically filter out any non/empty objects**.
|
|
133
|
+
|
|
134
|
+
Example usage when using a **function** as the handler
|
|
135
|
+
```typescript
|
|
136
|
+
/* The output of the function will be what the key is on the map */
|
|
137
|
+
const group = groupBy([
|
|
138
|
+
{tally: 20, name: 'Peter'},
|
|
139
|
+
{tally: 40, name: 'Jake'},
|
|
140
|
+
{tally: 5, name: 'Bob'},
|
|
141
|
+
], el => el.tally > 15);
|
|
142
|
+
|
|
143
|
+
/* Expected output: */
|
|
144
|
+
{
|
|
145
|
+
false: [{tally: 5, name: 'Bob'}],
|
|
146
|
+
true: [{tally: 20, name: 'Peter'}, {tally: 40, name: 'Jake'}],
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Can also work with a property return */
|
|
150
|
+
const group = groupBy([
|
|
151
|
+
{role: 'user', name: 'Peter'},
|
|
152
|
+
{role: 'user', name: 'Jake'},
|
|
153
|
+
{role: 'guest', name: 'Bob'},
|
|
154
|
+
{name: 'Alice'},
|
|
155
|
+
], el => el.role || 'other');
|
|
156
|
+
|
|
157
|
+
/* Expected output: */
|
|
158
|
+
{
|
|
159
|
+
user: [{role: 'user', name: 'Peter'}, {role: 'user', name: 'Jake'}],
|
|
160
|
+
guest: [{role: 'guest', name: 'Bob'}],
|
|
161
|
+
other: [{name: 'Alice'}],
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
**Take note**: If the function returns an undefined or empty string the object will be added to a fallback group called '_'
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
Example usage when using a **string** as the handler to denote a grouping by a certain property name
|
|
168
|
+
```typescript
|
|
169
|
+
const group = groupBy([
|
|
170
|
+
{role: 'user', name: 'Peter'},
|
|
171
|
+
{role: 'user', name: 'Jake'},
|
|
172
|
+
{role: 'guest', name: 'Bob'},
|
|
173
|
+
{name: 'Alice'},
|
|
174
|
+
], 'role');
|
|
175
|
+
|
|
176
|
+
/* Expected output: */
|
|
177
|
+
{
|
|
178
|
+
user: [{role: 'user', name: 'Peter'}, {role: 'user', name: 'Jake'}],
|
|
179
|
+
guest: [{role: 'guest', name: 'Bob'}],
|
|
180
|
+
_: [{name: 'Alice'}],
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Take note**: any object without the key will be added to a fallback group called '_'
|
|
185
|
+
|
|
186
|
+
|
|
131
187
|
- **dedupe(val:Array)**
|
|
132
188
|
Remove all duplicates from an array, behind the scenes it uses the fnv 1A hash algorithm to performantly do comparisons.
|
|
133
189
|
```js
|
|
@@ -278,7 +334,7 @@ const memoized_function = memoize((a) => {
|
|
|
278
334
|
- **isDate(val:any)**
|
|
279
335
|
Check if a variable is of type Date
|
|
280
336
|
```js
|
|
281
|
-
isDate(new Date('December 17, 1995 03:24:00'); // TRUE
|
|
337
|
+
isDate(new Date('December 17, 1995 03:24:00')); // TRUE
|
|
282
338
|
isDate('December 17, 1995 03:24:00'); // FALSE
|
|
283
339
|
```
|
|
284
340
|
|
|
@@ -545,6 +601,14 @@ An empty function that returns a promise that will immediately resolve itself an
|
|
|
545
601
|
An empty function that returns a promise that will resolve after X milliseconds, default is set to 1000ms.
|
|
546
602
|
**
|
|
547
603
|
|
|
604
|
+
### formdata
|
|
605
|
+
- **isFormData(val:any)**
|
|
606
|
+
Check if a variable is of type FormData
|
|
607
|
+
```js
|
|
608
|
+
isFormData(new FormData()); // TRUE
|
|
609
|
+
isFormData({hi: 'there'}); // FALSE
|
|
610
|
+
```
|
|
611
|
+
|
|
548
612
|
### hash
|
|
549
613
|
- **guid()**
|
|
550
614
|
Generate a unique identifier (guid) according to RFC4122
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = exports.groupBy = void 0;
|
|
4
|
+
const isNotEmpty_1 = require("../object/isNotEmpty");
|
|
5
|
+
const FALLBACK = '_';
|
|
6
|
+
const defaultHandler = () => FALLBACK;
|
|
7
|
+
function groupBy(arr, handler) {
|
|
8
|
+
if (!Array.isArray(arr))
|
|
9
|
+
return {};
|
|
10
|
+
const acc = {};
|
|
11
|
+
const n_handler = typeof handler === 'function'
|
|
12
|
+
? handler
|
|
13
|
+
: typeof handler === 'string' && handler.length
|
|
14
|
+
? ((el) => el[handler] ?? FALLBACK)
|
|
15
|
+
: defaultHandler;
|
|
16
|
+
let key;
|
|
17
|
+
const set = new Set();
|
|
18
|
+
for (const el of arr) {
|
|
19
|
+
if (!(0, isNotEmpty_1.isNotEmptyObject)(el))
|
|
20
|
+
continue;
|
|
21
|
+
key = n_handler(el);
|
|
22
|
+
if (key === undefined || (typeof key === 'string' && !key.length))
|
|
23
|
+
key = FALLBACK;
|
|
24
|
+
if (set.has(key)) {
|
|
25
|
+
acc[key].push(el);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
acc[key] = [el];
|
|
29
|
+
set.add(key);
|
|
30
|
+
}
|
|
31
|
+
return acc;
|
|
32
|
+
}
|
|
33
|
+
exports.groupBy = groupBy;
|
|
34
|
+
exports.default = groupBy;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { dedupe } from './dedupe';
|
|
2
|
+
import { isArray } from './is';
|
|
3
|
+
import { isNotEmptyArray } from './isNotEmpty';
|
|
4
|
+
import { join } from './join';
|
|
5
|
+
import { mapFn } from './mapFn';
|
|
6
|
+
import { mapKey } from './mapKey';
|
|
7
|
+
import { mapPrimitive } from './mapPrimitive';
|
|
8
|
+
import { groupBy } from './groupBy';
|
|
9
|
+
import { shuffle } from './shuffle';
|
|
10
|
+
import { sort } from './sort';
|
|
11
|
+
export { dedupe, isArray, isArray as is, isNotEmptyArray, isNotEmptyArray as isNotEmpty, isNotEmptyArray as isNeArray, isNotEmptyArray as isNe, join, mapFn, mapKey, mapPrimitive, groupBy, shuffle, sort };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sort = exports.shuffle = exports.groupBy = exports.mapPrimitive = exports.mapKey = exports.mapFn = exports.join = exports.isNe = exports.isNeArray = exports.isNotEmpty = exports.isNotEmptyArray = exports.is = exports.isArray = exports.dedupe = void 0;
|
|
4
|
+
const dedupe_1 = require("./dedupe");
|
|
5
|
+
Object.defineProperty(exports, "dedupe", { enumerable: true, get: function () { return dedupe_1.dedupe; } });
|
|
6
|
+
const is_1 = require("./is");
|
|
7
|
+
Object.defineProperty(exports, "isArray", { enumerable: true, get: function () { return is_1.isArray; } });
|
|
8
|
+
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isArray; } });
|
|
9
|
+
const isNotEmpty_1 = require("./isNotEmpty");
|
|
10
|
+
Object.defineProperty(exports, "isNotEmptyArray", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
11
|
+
Object.defineProperty(exports, "isNotEmpty", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
12
|
+
Object.defineProperty(exports, "isNeArray", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
13
|
+
Object.defineProperty(exports, "isNe", { enumerable: true, get: function () { return isNotEmpty_1.isNotEmptyArray; } });
|
|
14
|
+
const join_1 = require("./join");
|
|
15
|
+
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return join_1.join; } });
|
|
16
|
+
const mapFn_1 = require("./mapFn");
|
|
17
|
+
Object.defineProperty(exports, "mapFn", { enumerable: true, get: function () { return mapFn_1.mapFn; } });
|
|
18
|
+
const mapKey_1 = require("./mapKey");
|
|
19
|
+
Object.defineProperty(exports, "mapKey", { enumerable: true, get: function () { return mapKey_1.mapKey; } });
|
|
20
|
+
const mapPrimitive_1 = require("./mapPrimitive");
|
|
21
|
+
Object.defineProperty(exports, "mapPrimitive", { enumerable: true, get: function () { return mapPrimitive_1.mapPrimitive; } });
|
|
22
|
+
const groupBy_1 = require("./groupBy");
|
|
23
|
+
Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } });
|
|
24
|
+
const shuffle_1 = require("./shuffle");
|
|
25
|
+
Object.defineProperty(exports, "shuffle", { enumerable: true, get: function () { return shuffle_1.shuffle; } });
|
|
26
|
+
const sort_1 = require("./sort");
|
|
27
|
+
Object.defineProperty(exports, "sort", { enumerable: true, get: function () { return sort_1.sort; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.is = exports.isBoolean = void 0;
|
|
4
|
+
const is_1 = require("./is");
|
|
5
|
+
Object.defineProperty(exports, "isBoolean", { enumerable: true, get: function () { return is_1.isBoolean; } });
|
|
6
|
+
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isBoolean; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { addUTC } from './addUTC';
|
|
2
|
+
import { diff } from './diff';
|
|
3
|
+
import { endOfUTC } from './endOfUTC';
|
|
4
|
+
import { format } from './format';
|
|
5
|
+
import { isDate } from './is';
|
|
6
|
+
import { nowUnix } from './nowUnix';
|
|
7
|
+
import { nowUnixMs } from './nowUnixMs';
|
|
8
|
+
import { startOfUTC } from './startOfUTC';
|
|
9
|
+
import { toUnix } from './toUnix';
|
|
10
|
+
import { toUTC } from './toUTC';
|
|
11
|
+
export { addUTC, diff, endOfUTC, format, isDate, isDate as is, nowUnix, nowUnixMs, startOfUTC, toUnix, toUTC };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toUTC = exports.toUnix = exports.startOfUTC = exports.nowUnixMs = exports.nowUnix = exports.is = exports.isDate = exports.format = exports.endOfUTC = exports.diff = exports.addUTC = void 0;
|
|
4
|
+
const addUTC_1 = require("./addUTC");
|
|
5
|
+
Object.defineProperty(exports, "addUTC", { enumerable: true, get: function () { return addUTC_1.addUTC; } });
|
|
6
|
+
const diff_1 = require("./diff");
|
|
7
|
+
Object.defineProperty(exports, "diff", { enumerable: true, get: function () { return diff_1.diff; } });
|
|
8
|
+
const endOfUTC_1 = require("./endOfUTC");
|
|
9
|
+
Object.defineProperty(exports, "endOfUTC", { enumerable: true, get: function () { return endOfUTC_1.endOfUTC; } });
|
|
10
|
+
const format_1 = require("./format");
|
|
11
|
+
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return format_1.format; } });
|
|
12
|
+
const is_1 = require("./is");
|
|
13
|
+
Object.defineProperty(exports, "isDate", { enumerable: true, get: function () { return is_1.isDate; } });
|
|
14
|
+
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isDate; } });
|
|
15
|
+
const nowUnix_1 = require("./nowUnix");
|
|
16
|
+
Object.defineProperty(exports, "nowUnix", { enumerable: true, get: function () { return nowUnix_1.nowUnix; } });
|
|
17
|
+
const nowUnixMs_1 = require("./nowUnixMs");
|
|
18
|
+
Object.defineProperty(exports, "nowUnixMs", { enumerable: true, get: function () { return nowUnixMs_1.nowUnixMs; } });
|
|
19
|
+
const startOfUTC_1 = require("./startOfUTC");
|
|
20
|
+
Object.defineProperty(exports, "startOfUTC", { enumerable: true, get: function () { return startOfUTC_1.startOfUTC; } });
|
|
21
|
+
const toUnix_1 = require("./toUnix");
|
|
22
|
+
Object.defineProperty(exports, "toUnix", { enumerable: true, get: function () { return toUnix_1.toUnix; } });
|
|
23
|
+
const toUTC_1 = require("./toUTC");
|
|
24
|
+
Object.defineProperty(exports, "toUTC", { enumerable: true, get: function () { return toUTC_1.toUTC; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deepSet = exports.set = exports.deepSeal = exports.seal = exports.deepGet = exports.get = exports.deepFreeze = exports.freeze = void 0;
|
|
4
|
+
const freeze_1 = require("./freeze");
|
|
5
|
+
Object.defineProperty(exports, "freeze", { enumerable: true, get: function () { return freeze_1.deepFreeze; } });
|
|
6
|
+
Object.defineProperty(exports, "deepFreeze", { enumerable: true, get: function () { return freeze_1.deepFreeze; } });
|
|
7
|
+
const get_1 = require("./get");
|
|
8
|
+
Object.defineProperty(exports, "get", { enumerable: true, get: function () { return get_1.deepGet; } });
|
|
9
|
+
Object.defineProperty(exports, "deepGet", { enumerable: true, get: function () { return get_1.deepGet; } });
|
|
10
|
+
const seal_1 = require("./seal");
|
|
11
|
+
Object.defineProperty(exports, "seal", { enumerable: true, get: function () { return seal_1.deepSeal; } });
|
|
12
|
+
Object.defineProperty(exports, "deepSeal", { enumerable: true, get: function () { return seal_1.deepSeal; } });
|
|
13
|
+
const set_1 = require("./set");
|
|
14
|
+
Object.defineProperty(exports, "set", { enumerable: true, get: function () { return set_1.deepSet; } });
|
|
15
|
+
Object.defineProperty(exports, "deepSet", { enumerable: true, get: function () { return set_1.deepSet; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.is = exports.isFormData = void 0;
|
|
4
|
+
const is_1 = require("./is");
|
|
5
|
+
Object.defineProperty(exports, "isFormData", { enumerable: true, get: function () { return is_1.isFormData; } });
|
|
6
|
+
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isFormData; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether or not a provided value is an instance of FormData
|
|
3
|
+
*
|
|
4
|
+
* @param val - Value to verify
|
|
5
|
+
*
|
|
6
|
+
* @returns Whether or not the value is an instance of FormData
|
|
7
|
+
*/
|
|
8
|
+
declare function isFormData(val: unknown): val is FormData;
|
|
9
|
+
export { isFormData, isFormData as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isFunction } from './is';
|
|
2
|
+
import { isAsyncFunction } from './isAsync';
|
|
3
|
+
import { noop } from './noop';
|
|
4
|
+
import { noopresolve } from './noopresolve';
|
|
5
|
+
import { noopreturn } from './noopreturn';
|
|
6
|
+
import { sleep } from './sleep';
|
|
7
|
+
export { isFunction, isFunction as is, isFunction as isFn, isAsyncFunction, isAsyncFunction as isAsync, isAsyncFunction as isAsyncFn, noop, noopresolve, noopreturn, sleep };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sleep = exports.noopreturn = exports.noopresolve = exports.noop = exports.isAsyncFn = exports.isAsync = exports.isAsyncFunction = exports.isFn = exports.is = exports.isFunction = void 0;
|
|
4
|
+
const is_1 = require("./is");
|
|
5
|
+
Object.defineProperty(exports, "isFunction", { enumerable: true, get: function () { return is_1.isFunction; } });
|
|
6
|
+
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.isFunction; } });
|
|
7
|
+
Object.defineProperty(exports, "isFn", { enumerable: true, get: function () { return is_1.isFunction; } });
|
|
8
|
+
const isAsync_1 = require("./isAsync");
|
|
9
|
+
Object.defineProperty(exports, "isAsyncFunction", { enumerable: true, get: function () { return isAsync_1.isAsyncFunction; } });
|
|
10
|
+
Object.defineProperty(exports, "isAsync", { enumerable: true, get: function () { return isAsync_1.isAsyncFunction; } });
|
|
11
|
+
Object.defineProperty(exports, "isAsyncFn", { enumerable: true, get: function () { return isAsync_1.isAsyncFunction; } });
|
|
12
|
+
const noop_1 = require("./noop");
|
|
13
|
+
Object.defineProperty(exports, "noop", { enumerable: true, get: function () { return noop_1.noop; } });
|
|
14
|
+
const noopresolve_1 = require("./noopresolve");
|
|
15
|
+
Object.defineProperty(exports, "noopresolve", { enumerable: true, get: function () { return noopresolve_1.noopresolve; } });
|
|
16
|
+
const noopreturn_1 = require("./noopreturn");
|
|
17
|
+
Object.defineProperty(exports, "noopreturn", { enumerable: true, get: function () { return noopreturn_1.noopreturn; } });
|
|
18
|
+
const sleep_1 = require("./sleep");
|
|
19
|
+
Object.defineProperty(exports, "sleep", { enumerable: true, get: function () { return sleep_1.sleep; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.guid = exports.fnv1A = void 0;
|
|
4
|
+
const fnv1A_1 = require("./fnv1A");
|
|
5
|
+
Object.defineProperty(exports, "fnv1A", { enumerable: true, get: function () { return fnv1A_1.fnv1A; } });
|
|
6
|
+
const guid_1 = require("./guid");
|
|
7
|
+
Object.defineProperty(exports, "guid", { enumerable: true, get: function () { return guid_1.guid; } });
|