@valkyriestudios/utils 12.4.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 CHANGED
@@ -278,7 +278,7 @@ const memoized_function = memoize((a) => {
278
278
  - **isDate(val:any)**
279
279
  Check if a variable is of type Date
280
280
  ```js
281
- isDate(new Date('December 17, 1995 03:24:00'); // TRUE
281
+ isDate(new Date('December 17, 1995 03:24:00')); // TRUE
282
282
  isDate('December 17, 1995 03:24:00'); // FALSE
283
283
  ```
284
284
 
@@ -545,6 +545,14 @@ An empty function that returns a promise that will immediately resolve itself an
545
545
  An empty function that returns a promise that will resolve after X milliseconds, default is set to 1000ms.
546
546
  **
547
547
 
548
+ ### formdata
549
+ - **isFormData(val:any)**
550
+ Check if a variable is of type FormData
551
+ ```js
552
+ isFormData(new FormData()); // TRUE
553
+ isFormData({hi: 'there'}); // FALSE
554
+ ```
555
+
548
556
  ### hash
549
557
  - **guid()**
550
558
  Generate a unique identifier (guid) according to RFC4122
@@ -0,0 +1,10 @@
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 { shuffle } from './shuffle';
9
+ import { sort } from './sort';
10
+ export { dedupe, isArray, isArray as is, isNotEmptyArray, isNotEmptyArray as isNotEmpty, isNotEmptyArray as isNeArray, isNotEmptyArray as isNe, join, mapFn, mapKey, mapPrimitive, shuffle, sort };
package/array/index.js ADDED
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sort = exports.shuffle = 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 shuffle_1 = require("./shuffle");
23
+ Object.defineProperty(exports, "shuffle", { enumerable: true, get: function () { return shuffle_1.shuffle; } });
24
+ const sort_1 = require("./sort");
25
+ Object.defineProperty(exports, "sort", { enumerable: true, get: function () { return sort_1.sort; } });
@@ -0,0 +1,2 @@
1
+ import { isBoolean } from './is';
2
+ export { isBoolean, isBoolean as is };
@@ -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,2 @@
1
+ import { memoize } from './memoize';
2
+ export { memoize };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.memoize = void 0;
4
+ const memoize_1 = require("./memoize");
5
+ Object.defineProperty(exports, "memoize", { enumerable: true, get: function () { return memoize_1.memoize; } });
@@ -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 };
package/date/index.js ADDED
@@ -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,5 @@
1
+ import { deepFreeze } from './freeze';
2
+ import { deepGet } from './get';
3
+ import { deepSeal } from './seal';
4
+ import { deepSet } from './set';
5
+ export { deepFreeze as freeze, deepFreeze, deepGet as get, deepGet, deepSeal as seal, deepSeal, deepSet as set, deepSet };
package/deep/index.js ADDED
@@ -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,2 @@
1
+ import { isFormData } from './is';
2
+ export { isFormData, isFormData as is };
@@ -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 };
package/formdata/is.js ADDED
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = exports.isFormData = void 0;
4
+ function isFormData(val) {
5
+ return val instanceof FormData;
6
+ }
7
+ exports.isFormData = isFormData;
8
+ exports.default = isFormData;
@@ -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,3 @@
1
+ import { fnv1A } from './fnv1A';
2
+ import { guid } from './guid';
3
+ export { fnv1A, guid };
package/hash/index.js ADDED
@@ -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; } });