@koine/utils 1.1.10 → 1.1.11
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/Defer.js +6 -2
- package/{node/Defer.js → Defer.mjs} +2 -6
- package/Emitter.js +6 -2
- package/{node/Emitter.js → Emitter.mjs} +2 -6
- package/accentSets.js +5 -2
- package/{node/accentSets.js → accentSets.mjs} +2 -5
- package/addOrReplaceAtIdx.js +8 -4
- package/addOrReplaceAtIdx.mjs +19 -0
- package/areEqual.js +10 -6
- package/{node/areEqual.js → areEqual.mjs} +6 -10
- package/arrayOfAll.js +6 -2
- package/{node/arrayOfAll.js → arrayOfAll.mjs} +2 -6
- package/arraySum.js +6 -2
- package/arraySum.mjs +9 -0
- package/arrayToLookup.js +6 -2
- package/{node/arrayToLookup.js → arrayToLookup.mjs} +2 -6
- package/buildUrlQueryString.js +12 -7
- package/{node/buildUrlQueryString.js → buildUrlQueryString.mjs} +7 -12
- package/capitalize.js +6 -2
- package/{node/capitalize.js → capitalize.mjs} +2 -6
- package/changeUrlPath.js +11 -6
- package/changeUrlPath.mjs +18 -0
- package/chunkByChunks.js +6 -2
- package/{node/chunkByChunks.js → chunkByChunks.mjs} +2 -6
- package/chunkBySize.js +6 -2
- package/{node/chunkBySize.js → chunkBySize.mjs} +2 -6
- package/clamp.js +6 -2
- package/{node/clamp.js → clamp.mjs} +2 -6
- package/clsx.js +6 -2
- package/{node/clsx.js → clsx.mjs} +2 -6
- package/convertRange.js +6 -2
- package/{node/convertRange.js → convertRange.mjs} +2 -6
- package/cookie.js +4 -1
- package/{node/cookie.js → cookie.mjs} +1 -4
- package/debounce.js +6 -2
- package/{node/debounce.js → debounce.mjs} +2 -6
- package/debouncePromise.js +6 -3
- package/debouncePromise.mjs +9 -0
- package/debounceRaf.js +6 -2
- package/{node/debounceRaf.js → debounceRaf.mjs} +2 -6
- package/decode.js +6 -2
- package/{node/decode.js → decode.mjs} +2 -6
- package/encode.js +6 -2
- package/{node/encode.js → encode.mjs} +2 -6
- package/ensureInt.js +6 -2
- package/ensureInt.mjs +9 -0
- package/{node/env.js → env.mjs} +0 -0
- package/findDuplicatedIndexes.js +6 -2
- package/{node/findDuplicatedIndexes.js → findDuplicatedIndexes.mjs} +2 -6
- package/forin.js +6 -2
- package/forin.mjs +11 -0
- package/gbToBytes.js +6 -2
- package/gbToBytes.mjs +7 -0
- package/getEmptyArray.js +9 -4
- package/getEmptyArray.mjs +15 -0
- package/getKeys.js +5 -2
- package/{node/getKeys.js → getKeys.mjs} +2 -5
- package/getMediaQueryWidthResolvers.js +8 -4
- package/{node/getMediaQueryWidthResolvers.js → getMediaQueryWidthResolvers.mjs} +4 -8
- package/getMediaQueryWidthTailwindScreens.js +8 -4
- package/{node/getMediaQueryWidthTailwindScreens.js → getMediaQueryWidthTailwindScreens.mjs} +4 -8
- package/getNonce.js +8 -4
- package/getNonce.mjs +9 -0
- package/getParamAmong.js +9 -4
- package/{node/getParamAmong.js → getParamAmong.mjs} +4 -9
- package/getParamAsInt.js +9 -4
- package/{node/getParamAsInt.js → getParamAsInt.mjs} +4 -9
- package/getParamAsString.js +9 -4
- package/getParamAsString.mjs +14 -0
- package/getType.js +6 -2
- package/{node/getType.js → getType.mjs} +2 -6
- package/getUrlHashParams.js +6 -2
- package/{node/getUrlHashParams.js → getUrlHashParams.mjs} +2 -6
- package/getUrlHashPathname.js +6 -2
- package/{node/getUrlHashPathname.js → getUrlHashPathname.mjs} +2 -6
- package/getUrlPathnameParts.js +9 -4
- package/{node/getUrlPathnameParts.js → getUrlPathnameParts.mjs} +4 -9
- package/getUrlQueryParams.js +9 -4
- package/{node/getUrlQueryParams.js → getUrlQueryParams.mjs} +4 -9
- package/imgEmptyPixel.js +5 -2
- package/imgEmptyPixel.mjs +7 -0
- package/index.js +132 -129
- package/index.mjs +131 -0
- package/invariant.js +6 -2
- package/{node/invariant.js → invariant.mjs} +2 -6
- package/isAnyObject.js +9 -4
- package/isAnyObject.mjs +10 -0
- package/isArray.js +9 -4
- package/isArray.mjs +10 -0
- package/isBlob.js +9 -4
- package/isBlob.mjs +10 -0
- package/isBoolean.js +9 -4
- package/isBoolean.mjs +10 -0
- package/isBrowser.js +5 -2
- package/isBrowser.mjs +8 -0
- package/isDate.js +9 -4
- package/isDate.mjs +10 -0
- package/isEmptyArray.js +9 -4
- package/isEmptyArray.mjs +10 -0
- package/isEmptyObject.js +9 -4
- package/isEmptyObject.mjs +10 -0
- package/isEmptyString.js +6 -2
- package/isEmptyString.mjs +9 -0
- package/isError.js +9 -4
- package/isError.mjs +10 -0
- package/isExternalUrl.js +9 -4
- package/{node/isExternalUrl.js → isExternalUrl.mjs} +4 -9
- package/isFile.js +9 -4
- package/isFile.mjs +10 -0
- package/isFloat.js +9 -4
- package/isFloat.mjs +10 -0
- package/isFormData.js +9 -4
- package/isFormData.mjs +10 -0
- package/isFullArray.js +9 -4
- package/isFullArray.mjs +10 -0
- package/isFullObject.js +9 -4
- package/isFullObject.mjs +10 -0
- package/isFullString.js +9 -4
- package/isFullString.mjs +10 -0
- package/isFunction.js +6 -2
- package/isFunction.mjs +9 -0
- package/isInt.js +9 -4
- package/isInt.mjs +10 -0
- package/isMap.js +9 -4
- package/isMap.mjs +10 -0
- package/isNaNValue.js +9 -4
- package/isNaNValue.mjs +10 -0
- package/isNegativeNumber.js +9 -4
- package/isNegativeNumber.mjs +10 -0
- package/isNull.js +9 -4
- package/isNull.mjs +10 -0
- package/isNullOrUndefined.js +9 -5
- package/isNullOrUndefined.mjs +10 -0
- package/isNumber.js +9 -4
- package/isNumber.mjs +12 -0
- package/isObject.js +9 -4
- package/isObject.mjs +10 -0
- package/isObjectLike.js +9 -4
- package/isObjectLike.mjs +12 -0
- package/isOneOf.js +6 -2
- package/isOneOf.mjs +10 -0
- package/isPlainObject.js +9 -4
- package/isPlainObject.mjs +13 -0
- package/isPositiveNumber.js +9 -4
- package/isPositiveNumber.mjs +10 -0
- package/isPrimitive.js +19 -14
- package/isPrimitive.mjs +20 -0
- package/isPromise.js +9 -4
- package/isPromise.mjs +10 -0
- package/isRegExp.js +9 -4
- package/isRegExp.mjs +10 -0
- package/isServer.js +7 -3
- package/isServer.mjs +9 -0
- package/isSet.js +9 -4
- package/isSet.mjs +10 -0
- package/isString.js +9 -4
- package/isString.mjs +10 -0
- package/isSymbol.js +9 -4
- package/isSymbol.mjs +10 -0
- package/isType.js +9 -4
- package/{node/isType.js → isType.mjs} +4 -9
- package/isUndefined.js +9 -4
- package/isUndefined.mjs +10 -0
- package/isWeakMap.js +9 -4
- package/isWeakMap.mjs +10 -0
- package/isWeakSet.js +9 -4
- package/isWeakSet.mjs +10 -0
- package/kbToBytes.js +6 -2
- package/kbToBytes.mjs +7 -0
- package/location.js +2 -1
- package/location.mjs +1 -0
- package/lowercase.js +6 -2
- package/lowercase.mjs +9 -0
- package/mapListBy.js +6 -2
- package/{node/mapListBy.js → mapListBy.mjs} +2 -6
- package/matchSorter.js +11 -7
- package/{node/matchSorter.js → matchSorter.mjs} +7 -11
- package/mbToBytes.js +6 -2
- package/mbToBytes.mjs +7 -0
- package/mergeObjects.js +11 -7
- package/{node/mergeObjects.js → mergeObjects.mjs} +7 -11
- package/mergeUrlQueryParams.js +9 -4
- package/{node/mergeUrlQueryParams.js → mergeUrlQueryParams.mjs} +4 -9
- package/moveSortableArrayItemByKey.js +8 -4
- package/{node/moveSortableArrayItemByKey.js → moveSortableArrayItemByKey.mjs} +4 -8
- package/noop.js +6 -2
- package/noop.mjs +7 -0
- package/normaliseUrl.js +9 -4
- package/normaliseUrl.mjs +15 -0
- package/normaliseUrlPathname.js +9 -4
- package/normaliseUrlPathname.mjs +14 -0
- package/objectOmit.js +6 -2
- package/{node/objectOmit.js → objectOmit.mjs} +2 -6
- package/objectPick.js +6 -2
- package/{node/objectPick.js → objectPick.mjs} +2 -6
- package/package.json +4 -3
- package/parseCookie.js +6 -2
- package/{node/parseCookie.js → parseCookie.mjs} +2 -6
- package/parseURL.js +6 -2
- package/{node/parseURL.js → parseURL.mjs} +2 -6
- package/quaranteneProps.js +6 -2
- package/{node/quaranteneProps.js → quaranteneProps.mjs} +2 -6
- package/randomInt.js +6 -2
- package/randomInt.mjs +9 -0
- package/randomKey.js +6 -2
- package/{node/randomKey.js → randomKey.mjs} +2 -6
- package/readCookie.js +6 -2
- package/{node/readCookie.js → readCookie.mjs} +2 -6
- package/removeAccents.js +8 -4
- package/removeAccents.mjs +15 -0
- package/removeCookie.js +10 -6
- package/removeCookie.mjs +15 -0
- package/{node/removeDuplicates.js → removeDuplicates.mjs} +0 -0
- package/removeDuplicatesByKey.js +6 -2
- package/{node/removeDuplicatesByKey.js → removeDuplicatesByKey.mjs} +2 -6
- package/removeDuplicatesComparing.js +10 -6
- package/removeDuplicatesComparing.mjs +10 -0
- package/removeIndexesFromArray.js +6 -2
- package/removeIndexesFromArray.mjs +14 -0
- package/removeTrailingSlash.js +6 -2
- package/removeTrailingSlash.mjs +10 -0
- package/removeUrlQueryParams.js +11 -6
- package/removeUrlQueryParams.mjs +21 -0
- package/roundTo.js +6 -2
- package/{node/roundTo.js → roundTo.mjs} +2 -6
- package/serializeCookie.js +8 -4
- package/{node/serializeCookie.js → serializeCookie.mjs} +4 -8
- package/setCookie.js +14 -10
- package/{node/setCookie.js → setCookie.mjs} +10 -14
- package/shuffle.js +8 -4
- package/{node/shuffle.js → shuffle.mjs} +4 -8
- package/slugify.js +9 -5
- package/{node/slugify.js → slugify.mjs} +5 -9
- package/swapMap.js +6 -2
- package/{node/swapMap.js → swapMap.mjs} +2 -6
- package/throttle.js +8 -4
- package/{node/throttle.js → throttle.mjs} +4 -8
- package/titleCase.js +6 -2
- package/{node/titleCase.js → titleCase.mjs} +2 -6
- package/toNumber.js +8 -4
- package/toNumber.mjs +8 -0
- package/toRgba.js +6 -2
- package/{node/toRgba.js → toRgba.mjs} +2 -6
- package/transformToUrlPathname.js +9 -4
- package/transformToUrlPathname.mjs +16 -0
- package/truncate.js +6 -2
- package/truncate.mjs +13 -0
- package/tryUntil.js +6 -2
- package/{node/tryUntil.js → tryUntil.mjs} +2 -6
- package/types.js +2 -1
- package/types.mjs +1 -0
- package/uid.js +6 -2
- package/{node/uid.js → uid.mjs} +2 -6
- package/updateLinkParams.js +9 -4
- package/updateLinkParams.mjs +14 -0
- package/updateUrlQueryParams.js +12 -7
- package/updateUrlQueryParams.mjs +18 -0
- package/uppercase.js +6 -2
- package/uppercase.mjs +9 -0
- package/uuid.js +6 -2
- package/{node/uuid.js → uuid.mjs} +2 -6
- package/uuidNumeric.js +6 -2
- package/uuidNumeric.mjs +6 -0
- package/wait.js +6 -2
- package/wait.mjs +9 -0
- package/node/addOrReplaceAtIdx.js +0 -23
- package/node/arraySum.js +0 -13
- package/node/changeUrlPath.js +0 -23
- package/node/debouncePromise.js +0 -12
- package/node/ensureInt.js +0 -13
- package/node/forin.js +0 -15
- package/node/gbToBytes.js +0 -11
- package/node/getEmptyArray.js +0 -20
- package/node/getNonce.js +0 -13
- package/node/getParamAsString.js +0 -19
- package/node/imgEmptyPixel.js +0 -10
- package/node/index.js +0 -134
- package/node/isAnyObject.js +0 -15
- package/node/isArray.js +0 -15
- package/node/isBlob.js +0 -15
- package/node/isBoolean.js +0 -15
- package/node/isBrowser.js +0 -11
- package/node/isDate.js +0 -15
- package/node/isEmptyArray.js +0 -15
- package/node/isEmptyObject.js +0 -15
- package/node/isEmptyString.js +0 -13
- package/node/isError.js +0 -15
- package/node/isFile.js +0 -15
- package/node/isFloat.js +0 -15
- package/node/isFormData.js +0 -15
- package/node/isFullArray.js +0 -15
- package/node/isFullObject.js +0 -15
- package/node/isFullString.js +0 -15
- package/node/isFunction.js +0 -13
- package/node/isInt.js +0 -15
- package/node/isMap.js +0 -15
- package/node/isNaNValue.js +0 -15
- package/node/isNegativeNumber.js +0 -15
- package/node/isNull.js +0 -15
- package/node/isNullOrUndefined.js +0 -14
- package/node/isNumber.js +0 -17
- package/node/isObject.js +0 -15
- package/node/isObjectLike.js +0 -17
- package/node/isOneOf.js +0 -14
- package/node/isPlainObject.js +0 -18
- package/node/isPositiveNumber.js +0 -15
- package/node/isPrimitive.js +0 -25
- package/node/isPromise.js +0 -15
- package/node/isRegExp.js +0 -15
- package/node/isServer.js +0 -13
- package/node/isSet.js +0 -15
- package/node/isString.js +0 -15
- package/node/isSymbol.js +0 -15
- package/node/isUndefined.js +0 -15
- package/node/isWeakMap.js +0 -15
- package/node/isWeakSet.js +0 -15
- package/node/kbToBytes.js +0 -11
- package/node/location.js +0 -2
- package/node/lowercase.js +0 -13
- package/node/mbToBytes.js +0 -11
- package/node/noop.js +0 -11
- package/node/normaliseUrl.js +0 -20
- package/node/normaliseUrlPathname.js +0 -19
- package/node/randomInt.js +0 -13
- package/node/removeAccents.js +0 -19
- package/node/removeCookie.js +0 -19
- package/node/removeDuplicatesComparing.js +0 -14
- package/node/removeIndexesFromArray.js +0 -18
- package/node/removeTrailingSlash.js +0 -14
- package/node/removeUrlQueryParams.js +0 -26
- package/node/toNumber.js +0 -12
- package/node/transformToUrlPathname.js +0 -21
- package/node/truncate.js +0 -17
- package/node/types.js +0 -2
- package/node/updateLinkParams.js +0 -19
- package/node/updateUrlQueryParams.js +0 -23
- package/node/uppercase.js +0 -13
- package/node/uuidNumeric.js +0 -10
- package/node/wait.js +0 -13
package/uppercase.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uppercase = void 0;
|
|
1
4
|
/**
|
|
2
5
|
* Replacement for native `toUpperCase` tyescript ready (type narrowing ready)
|
|
3
6
|
*
|
|
4
7
|
* @category native
|
|
5
8
|
*/
|
|
6
|
-
|
|
9
|
+
var uppercase = function (str) {
|
|
7
10
|
return (str || "").toUpperCase();
|
|
8
11
|
};
|
|
9
|
-
|
|
12
|
+
exports.uppercase = uppercase;
|
|
13
|
+
exports.default = exports.uppercase;
|
package/uppercase.mjs
ADDED
package/uuid.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uuid = void 0;
|
|
1
4
|
/**
|
|
2
5
|
* Uuid, tiny custom helper instead of node's uuid/v4
|
|
3
6
|
*
|
|
4
7
|
* @category uid
|
|
5
8
|
* @see https://stackoverflow.com/a/2117523/1938970
|
|
6
9
|
*/
|
|
7
|
-
|
|
10
|
+
var uuid = function () {
|
|
8
11
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
|
9
12
|
var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8;
|
|
10
13
|
return v.toString(16);
|
|
11
14
|
});
|
|
12
15
|
};
|
|
13
|
-
|
|
16
|
+
exports.uuid = uuid;
|
|
17
|
+
exports.default = exports.uuid;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uuid = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Uuid, tiny custom helper instead of node's uuid/v4
|
|
6
3
|
*
|
|
7
4
|
* @category uid
|
|
8
5
|
* @see https://stackoverflow.com/a/2117523/1938970
|
|
9
6
|
*/
|
|
10
|
-
var uuid = function () {
|
|
7
|
+
export var uuid = function () {
|
|
11
8
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
|
12
9
|
var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8;
|
|
13
10
|
return v.toString(16);
|
|
14
11
|
});
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
exports.default = exports.uuid;
|
|
13
|
+
export default uuid;
|
package/uuidNumeric.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uuidNumeric = void 0;
|
|
1
4
|
/**
|
|
2
5
|
* @category uid
|
|
3
6
|
* @see https://stackoverflow.com/a/18048162/1938970
|
|
4
7
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
var uuidNumeric = function () { return new Date().valueOf(); };
|
|
9
|
+
exports.uuidNumeric = uuidNumeric;
|
|
10
|
+
exports.default = exports.uuidNumeric;
|
package/uuidNumeric.mjs
ADDED
package/wait.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wait = void 0;
|
|
1
4
|
/**
|
|
2
5
|
* A promisified `setTimeout`
|
|
3
6
|
*
|
|
4
7
|
* @category async
|
|
5
8
|
*/
|
|
6
|
-
|
|
9
|
+
var wait = function (milliseconds) {
|
|
7
10
|
return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
|
|
8
11
|
};
|
|
9
|
-
|
|
12
|
+
exports.wait = wait;
|
|
13
|
+
exports.default = exports.wait;
|
package/wait.mjs
ADDED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addOrReplaceAtIdx = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
/**
|
|
6
|
-
* @category array
|
|
7
|
-
*/
|
|
8
|
-
function addOrReplaceAtIdx(list, newItem, newIdx) {
|
|
9
|
-
if (list.length === 0) {
|
|
10
|
-
return [newItem];
|
|
11
|
-
}
|
|
12
|
-
if (typeof newIdx === "undefined" || list.length - 1 < newIdx) {
|
|
13
|
-
return tslib_1.__spreadArray(tslib_1.__spreadArray([], list, true), [newItem], false);
|
|
14
|
-
}
|
|
15
|
-
return list.map(function (item, idx) {
|
|
16
|
-
if (idx === newIdx) {
|
|
17
|
-
return newItem;
|
|
18
|
-
}
|
|
19
|
-
return item;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
exports.addOrReplaceAtIdx = addOrReplaceAtIdx;
|
|
23
|
-
exports.default = addOrReplaceAtIdx;
|
package/node/arraySum.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.arraySum = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Sum array of numbers
|
|
6
|
-
*
|
|
7
|
-
* @category array | math
|
|
8
|
-
*/
|
|
9
|
-
var arraySum = function (numbers) {
|
|
10
|
-
return numbers.reduce(function (sum, current) { return sum + current; }, 0);
|
|
11
|
-
};
|
|
12
|
-
exports.arraySum = arraySum;
|
|
13
|
-
exports.default = exports.arraySum;
|
package/node/changeUrlPath.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.changeUrlPath = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isBrowser_1 = tslib_1.__importDefault(require("./isBrowser"));
|
|
6
|
-
var normaliseUrlPathname_1 = tslib_1.__importDefault(require("./normaliseUrlPathname"));
|
|
7
|
-
/**
|
|
8
|
-
* Change URL path, ensures initial and ending slashes and normalise eventual
|
|
9
|
-
* consecutive slashes, it uses `history`.
|
|
10
|
-
*
|
|
11
|
-
* @category location
|
|
12
|
-
* @param replace Replace URL instead of pushing it in the history stack. By default it pushes it.
|
|
13
|
-
* @returns {string} The new cleaned pathname
|
|
14
|
-
*/
|
|
15
|
-
function changeUrlPath(pathname, state, replace) {
|
|
16
|
-
var path = (0, normaliseUrlPathname_1.default)("/".concat(pathname, "/"));
|
|
17
|
-
if (isBrowser_1.default) {
|
|
18
|
-
history[replace ? "replaceState" : "pushState"](state, "", path);
|
|
19
|
-
}
|
|
20
|
-
return path;
|
|
21
|
-
}
|
|
22
|
-
exports.changeUrlPath = changeUrlPath;
|
|
23
|
-
exports.default = changeUrlPath;
|
package/node/debouncePromise.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.debouncePromise = void 0;
|
|
4
|
-
var ts_debounce_1 = require("ts-debounce");
|
|
5
|
-
/**
|
|
6
|
-
* Debounce function (with `Promise`)
|
|
7
|
-
*
|
|
8
|
-
* @category function
|
|
9
|
-
* @borrows [chodorowicz/ts-debounce](https://github.com/chodorowicz/ts-debounce)
|
|
10
|
-
*/
|
|
11
|
-
exports.debouncePromise = ts_debounce_1.debounce;
|
|
12
|
-
exports.default = exports.debouncePromise;
|
package/node/ensureInt.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureInt = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Ensure input to be an integer
|
|
6
|
-
*
|
|
7
|
-
* @category cast
|
|
8
|
-
*/
|
|
9
|
-
var ensureInt = function (input) {
|
|
10
|
-
return typeof input === "string" ? parseInt(input, 10) : Math.round(input);
|
|
11
|
-
};
|
|
12
|
-
exports.ensureInt = ensureInt;
|
|
13
|
-
exports.default = exports.ensureInt;
|
package/node/forin.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forin = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* To easily get typed native `for in`
|
|
6
|
-
*
|
|
7
|
-
* @category objects
|
|
8
|
-
*/
|
|
9
|
-
function forin(object, cb) {
|
|
10
|
-
for (var key in object) {
|
|
11
|
-
cb(key, object[key]);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.forin = forin;
|
|
15
|
-
exports.default = forin;
|
package/node/gbToBytes.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gbToBytes = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Gigabytes to bytes
|
|
6
|
-
*
|
|
7
|
-
* @category format
|
|
8
|
-
*/
|
|
9
|
-
var gbToBytes = function (bytes) { return bytes * 1000 * 1000 * 1000; };
|
|
10
|
-
exports.gbToBytes = gbToBytes;
|
|
11
|
-
exports.default = exports.gbToBytes;
|
package/node/getEmptyArray.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEmptyArray = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isNumber_1 = tslib_1.__importDefault(require("./isNumber"));
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* Returns an array of undefined values of the desired length, useful to build
|
|
9
|
-
* skeleton UIs.
|
|
10
|
-
*
|
|
11
|
-
* @category array
|
|
12
|
-
*/
|
|
13
|
-
function getEmptyArray /* <T extends undefined | null = undefined> */(length) {
|
|
14
|
-
if (!(0, isNumber_1.default)(length)) {
|
|
15
|
-
length = parseInt(length, 10);
|
|
16
|
-
}
|
|
17
|
-
return Array.from({ length: length });
|
|
18
|
-
}
|
|
19
|
-
exports.getEmptyArray = getEmptyArray;
|
|
20
|
-
exports.default = getEmptyArray;
|
package/node/getNonce.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNonce = void 0;
|
|
4
|
-
var isUndefined_1 = require("./isUndefined");
|
|
5
|
-
/**
|
|
6
|
-
* @category security
|
|
7
|
-
* @see https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/nonce.ts
|
|
8
|
-
*/
|
|
9
|
-
function getNonce() {
|
|
10
|
-
return (0, isUndefined_1.isUndefined)(__webpack_nonce__) ? null : __webpack_nonce__;
|
|
11
|
-
}
|
|
12
|
-
exports.getNonce = getNonce;
|
|
13
|
-
exports.default = getNonce;
|
package/node/getParamAsString.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getParamAsString = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isArray_1 = tslib_1.__importDefault(require("./isArray"));
|
|
6
|
-
/**
|
|
7
|
-
* Get query parameter as `string` treating the `ParsedUrlQuery` result of
|
|
8
|
-
* [`querystring`](https://nodejs.org/api/querystring.html) (used in next.js
|
|
9
|
-
* router and elsewhere)
|
|
10
|
-
*
|
|
11
|
-
* @category location
|
|
12
|
-
*
|
|
13
|
-
* @param {string} [raw] - The _raw_ query parameter
|
|
14
|
-
*/
|
|
15
|
-
function getParamAsString(raw) {
|
|
16
|
-
return ((0, isArray_1.default)(raw) ? raw[0] : raw) || "";
|
|
17
|
-
}
|
|
18
|
-
exports.getParamAsString = getParamAsString;
|
|
19
|
-
exports.default = getParamAsString;
|
package/node/imgEmptyPixel.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.imgEmptyPixel = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Empty img pixel as a string to inline
|
|
6
|
-
*
|
|
7
|
-
* @category img
|
|
8
|
-
*/
|
|
9
|
-
exports.imgEmptyPixel = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
|
|
10
|
-
exports.default = exports.imgEmptyPixel;
|
package/node/index.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./accentSets"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./addOrReplaceAtIdx"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./areEqual"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./arrayOfAll"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./arraySum"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./arrayToLookup"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./buildUrlQueryString"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./capitalize"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./changeUrlPath"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./chunkByChunks"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./chunkBySize"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./clamp"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./clsx"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./convertRange"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./cookie"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./debounce"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./debounceRaf"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./debouncePromise"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./decode"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./Defer"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("./Emitter"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("./encode"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("./ensureInt"), exports);
|
|
27
|
-
// export * from "./env"
|
|
28
|
-
tslib_1.__exportStar(require("./findDuplicatedIndexes"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("./forin"), exports);
|
|
30
|
-
tslib_1.__exportStar(require("./gbToBytes"), exports);
|
|
31
|
-
tslib_1.__exportStar(require("./getEmptyArray"), exports);
|
|
32
|
-
tslib_1.__exportStar(require("./getKeys"), exports);
|
|
33
|
-
tslib_1.__exportStar(require("./getMediaQueryWidthResolvers"), exports);
|
|
34
|
-
tslib_1.__exportStar(require("./getMediaQueryWidthTailwindScreens"), exports);
|
|
35
|
-
tslib_1.__exportStar(require("./getNonce"), exports);
|
|
36
|
-
tslib_1.__exportStar(require("./getParamAmong"), exports);
|
|
37
|
-
tslib_1.__exportStar(require("./getParamAsInt"), exports);
|
|
38
|
-
tslib_1.__exportStar(require("./getParamAsString"), exports);
|
|
39
|
-
tslib_1.__exportStar(require("./getType"), exports);
|
|
40
|
-
tslib_1.__exportStar(require("./getUrlHashParams"), exports);
|
|
41
|
-
tslib_1.__exportStar(require("./getUrlHashPathname"), exports);
|
|
42
|
-
tslib_1.__exportStar(require("./getUrlPathnameParts"), exports);
|
|
43
|
-
tslib_1.__exportStar(require("./getUrlQueryParams"), exports);
|
|
44
|
-
tslib_1.__exportStar(require("./imgEmptyPixel"), exports);
|
|
45
|
-
tslib_1.__exportStar(require("./isAnyObject"), exports);
|
|
46
|
-
tslib_1.__exportStar(require("./isArray"), exports);
|
|
47
|
-
tslib_1.__exportStar(require("./isBlob"), exports);
|
|
48
|
-
tslib_1.__exportStar(require("./isBoolean"), exports);
|
|
49
|
-
tslib_1.__exportStar(require("./isBrowser"), exports);
|
|
50
|
-
tslib_1.__exportStar(require("./isDate"), exports);
|
|
51
|
-
tslib_1.__exportStar(require("./isEmptyArray"), exports);
|
|
52
|
-
tslib_1.__exportStar(require("./isEmptyObject"), exports);
|
|
53
|
-
tslib_1.__exportStar(require("./isEmptyString"), exports);
|
|
54
|
-
tslib_1.__exportStar(require("./isError"), exports);
|
|
55
|
-
tslib_1.__exportStar(require("./isExternalUrl"), exports);
|
|
56
|
-
tslib_1.__exportStar(require("./isFile"), exports);
|
|
57
|
-
tslib_1.__exportStar(require("./isFloat"), exports);
|
|
58
|
-
tslib_1.__exportStar(require("./isFormData"), exports);
|
|
59
|
-
tslib_1.__exportStar(require("./isFullArray"), exports);
|
|
60
|
-
tslib_1.__exportStar(require("./isFullObject"), exports);
|
|
61
|
-
tslib_1.__exportStar(require("./isFullString"), exports);
|
|
62
|
-
tslib_1.__exportStar(require("./isFunction"), exports);
|
|
63
|
-
tslib_1.__exportStar(require("./isInt"), exports);
|
|
64
|
-
tslib_1.__exportStar(require("./isMap"), exports);
|
|
65
|
-
tslib_1.__exportStar(require("./isNaNValue"), exports);
|
|
66
|
-
tslib_1.__exportStar(require("./isNegativeNumber"), exports);
|
|
67
|
-
tslib_1.__exportStar(require("./isNullOrUndefined"), exports);
|
|
68
|
-
tslib_1.__exportStar(require("./isNull"), exports);
|
|
69
|
-
tslib_1.__exportStar(require("./isNumber"), exports);
|
|
70
|
-
tslib_1.__exportStar(require("./isObjectLike"), exports);
|
|
71
|
-
tslib_1.__exportStar(require("./isObject"), exports);
|
|
72
|
-
tslib_1.__exportStar(require("./isOneOf"), exports);
|
|
73
|
-
tslib_1.__exportStar(require("./isPlainObject"), exports);
|
|
74
|
-
tslib_1.__exportStar(require("./isPositiveNumber"), exports);
|
|
75
|
-
tslib_1.__exportStar(require("./isPrimitive"), exports);
|
|
76
|
-
tslib_1.__exportStar(require("./isPromise"), exports);
|
|
77
|
-
tslib_1.__exportStar(require("./isRegExp"), exports);
|
|
78
|
-
tslib_1.__exportStar(require("./isServer"), exports);
|
|
79
|
-
tslib_1.__exportStar(require("./isSet"), exports);
|
|
80
|
-
tslib_1.__exportStar(require("./isString"), exports);
|
|
81
|
-
tslib_1.__exportStar(require("./isSymbol"), exports);
|
|
82
|
-
tslib_1.__exportStar(require("./isType"), exports);
|
|
83
|
-
tslib_1.__exportStar(require("./isUndefined"), exports);
|
|
84
|
-
tslib_1.__exportStar(require("./isWeakMap"), exports);
|
|
85
|
-
tslib_1.__exportStar(require("./isWeakSet"), exports);
|
|
86
|
-
tslib_1.__exportStar(require("./kbToBytes"), exports);
|
|
87
|
-
tslib_1.__exportStar(require("./location"), exports);
|
|
88
|
-
tslib_1.__exportStar(require("./lowercase"), exports);
|
|
89
|
-
tslib_1.__exportStar(require("./mapListBy"), exports);
|
|
90
|
-
tslib_1.__exportStar(require("./matchSorter"), exports);
|
|
91
|
-
tslib_1.__exportStar(require("./mbToBytes"), exports);
|
|
92
|
-
tslib_1.__exportStar(require("./mergeObjects"), exports);
|
|
93
|
-
tslib_1.__exportStar(require("./mergeUrlQueryParams"), exports);
|
|
94
|
-
tslib_1.__exportStar(require("./moveSortableArrayItemByKey"), exports);
|
|
95
|
-
tslib_1.__exportStar(require("./noop"), exports);
|
|
96
|
-
tslib_1.__exportStar(require("./normaliseUrlPathname"), exports);
|
|
97
|
-
tslib_1.__exportStar(require("./normaliseUrl"), exports);
|
|
98
|
-
tslib_1.__exportStar(require("./objectPick"), exports);
|
|
99
|
-
tslib_1.__exportStar(require("./objectOmit"), exports);
|
|
100
|
-
tslib_1.__exportStar(require("./parseCookie"), exports);
|
|
101
|
-
tslib_1.__exportStar(require("./parseURL"), exports);
|
|
102
|
-
tslib_1.__exportStar(require("./quaranteneProps"), exports);
|
|
103
|
-
tslib_1.__exportStar(require("./randomInt"), exports);
|
|
104
|
-
tslib_1.__exportStar(require("./randomKey"), exports);
|
|
105
|
-
tslib_1.__exportStar(require("./readCookie"), exports);
|
|
106
|
-
tslib_1.__exportStar(require("./removeAccents"), exports);
|
|
107
|
-
tslib_1.__exportStar(require("./removeCookie"), exports);
|
|
108
|
-
// export * from "./removeDuplicates";
|
|
109
|
-
tslib_1.__exportStar(require("./removeDuplicatesByKey"), exports);
|
|
110
|
-
tslib_1.__exportStar(require("./removeDuplicatesComparing"), exports);
|
|
111
|
-
tslib_1.__exportStar(require("./removeIndexesFromArray"), exports);
|
|
112
|
-
tslib_1.__exportStar(require("./removeTrailingSlash"), exports);
|
|
113
|
-
tslib_1.__exportStar(require("./removeUrlQueryParams"), exports);
|
|
114
|
-
tslib_1.__exportStar(require("./roundTo"), exports);
|
|
115
|
-
tslib_1.__exportStar(require("./serializeCookie"), exports);
|
|
116
|
-
tslib_1.__exportStar(require("./setCookie"), exports);
|
|
117
|
-
tslib_1.__exportStar(require("./shuffle"), exports);
|
|
118
|
-
tslib_1.__exportStar(require("./slugify"), exports);
|
|
119
|
-
tslib_1.__exportStar(require("./swapMap"), exports);
|
|
120
|
-
tslib_1.__exportStar(require("./throttle"), exports);
|
|
121
|
-
tslib_1.__exportStar(require("./titleCase"), exports);
|
|
122
|
-
tslib_1.__exportStar(require("./toNumber"), exports);
|
|
123
|
-
tslib_1.__exportStar(require("./toRgba"), exports);
|
|
124
|
-
tslib_1.__exportStar(require("./transformToUrlPathname"), exports);
|
|
125
|
-
tslib_1.__exportStar(require("./truncate"), exports);
|
|
126
|
-
tslib_1.__exportStar(require("./tryUntil"), exports);
|
|
127
|
-
tslib_1.__exportStar(require("./uid"), exports);
|
|
128
|
-
tslib_1.__exportStar(require("./updateLinkParams"), exports);
|
|
129
|
-
tslib_1.__exportStar(require("./updateUrlQueryParams"), exports);
|
|
130
|
-
tslib_1.__exportStar(require("./uppercase"), exports);
|
|
131
|
-
tslib_1.__exportStar(require("./uuid"), exports);
|
|
132
|
-
tslib_1.__exportStar(require("./uuidNumeric"), exports);
|
|
133
|
-
tslib_1.__exportStar(require("./wait"), exports);
|
|
134
|
-
tslib_1.__exportStar(require("./types"), exports);
|
package/node/isAnyObject.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAnyObject = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isAnyObject(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Object";
|
|
13
|
-
}
|
|
14
|
-
exports.isAnyObject = isAnyObject;
|
|
15
|
-
exports.default = isAnyObject;
|
package/node/isArray.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isArray = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is an array
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isArray(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Array";
|
|
13
|
-
}
|
|
14
|
-
exports.isArray = isArray;
|
|
15
|
-
exports.default = isArray;
|
package/node/isBlob.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isBlob = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a Blob
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isBlob(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Blob";
|
|
13
|
-
}
|
|
14
|
-
exports.isBlob = isBlob;
|
|
15
|
-
exports.default = isBlob;
|
package/node/isBoolean.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isBoolean = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a boolean
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isBoolean(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Boolean";
|
|
13
|
-
}
|
|
14
|
-
exports.isBoolean = isBoolean;
|
|
15
|
-
exports.default = isBoolean;
|
package/node/isBrowser.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { isUndefined } from "./is";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.isBrowser = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* @category ssr
|
|
7
|
-
* @category is
|
|
8
|
-
*/
|
|
9
|
-
exports.isBrowser = typeof window !== "undefined";
|
|
10
|
-
// export const isBrowser = () => !isUndefined(window);
|
|
11
|
-
exports.default = exports.isBrowser;
|
package/node/isDate.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDate = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a Date, and that the date is valid
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isDate(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Date" && !isNaN(payload);
|
|
13
|
-
}
|
|
14
|
-
exports.isDate = isDate;
|
|
15
|
-
exports.default = isDate;
|
package/node/isEmptyArray.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEmptyArray = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isArray_1 = tslib_1.__importDefault(require("./isArray"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a an empty array
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isEmptyArray(payload) {
|
|
12
|
-
return (0, isArray_1.default)(payload) && payload.length === 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isEmptyArray = isEmptyArray;
|
|
15
|
-
exports.default = isEmptyArray;
|
package/node/isEmptyObject.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEmptyObject = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isPlainObject_1 = tslib_1.__importDefault(require("./isPlainObject"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isEmptyObject(payload) {
|
|
12
|
-
return (0, isPlainObject_1.default)(payload) && Object.keys(payload).length === 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isEmptyObject = isEmptyObject;
|
|
15
|
-
exports.default = isEmptyObject;
|
package/node/isEmptyString.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEmptyString = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Returns whether the payload is ''
|
|
6
|
-
*
|
|
7
|
-
* @category is
|
|
8
|
-
*/
|
|
9
|
-
function isEmptyString(payload) {
|
|
10
|
-
return payload === "";
|
|
11
|
-
}
|
|
12
|
-
exports.isEmptyString = isEmptyString;
|
|
13
|
-
exports.default = isEmptyString;
|
package/node/isError.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isError = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is an Error
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isError(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Error";
|
|
13
|
-
}
|
|
14
|
-
exports.isError = isError;
|
|
15
|
-
exports.default = isError;
|
package/node/isFile.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFile = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a File
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isFile(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "File";
|
|
13
|
-
}
|
|
14
|
-
exports.isFile = isFile;
|
|
15
|
-
exports.default = isFile;
|
package/node/isFloat.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFloat = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isNumber_1 = tslib_1.__importDefault(require("./isNumber"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a float number
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isFloat(payload) {
|
|
12
|
-
return (0, isNumber_1.default)(payload) && payload % 1 !== 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isFloat = isFloat;
|
|
15
|
-
exports.default = isFloat;
|
package/node/isFormData.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFormData = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a FormData
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isFormData(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "FormData";
|
|
13
|
-
}
|
|
14
|
-
exports.isFormData = isFormData;
|
|
15
|
-
exports.default = isFormData;
|