@koine/utils 1.0.26 → 1.0.29
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/{async.d.ts → Defer.d.ts} +5 -5
- package/{async.js → Defer.js} +2 -7
- package/{emitter.d.ts → Emitter.d.ts} +1 -0
- package/{emitter.js → Emitter.js} +1 -0
- package/accentSets.d.ts +16 -0
- package/accentSets.js +38 -0
- package/addOrReplaceAtIdx.d.ts +5 -0
- package/addOrReplaceAtIdx.js +19 -0
- package/arrayToLookup.d.ts +7 -0
- package/arrayToLookup.js +13 -0
- package/buildUrlQueryString.d.ts +12 -0
- package/buildUrlQueryString.js +24 -0
- package/changeUrlPath.d.ts +10 -0
- package/changeUrlPath.js +18 -0
- package/chunkByChunks.d.ts +7 -0
- package/chunkByChunks.js +37 -0
- package/chunkBySize.d.ts +6 -0
- package/chunkBySize.js +12 -0
- package/clamp.d.ts +8 -0
- package/clamp.js +10 -0
- package/clsx.d.ts +9 -0
- package/clsx.js +49 -0
- package/convertRange.d.ts +14 -0
- package/convertRange.js +16 -0
- package/cookie.d.ts +7 -26
- package/cookie.js +3 -221
- package/decode.d.ts +6 -0
- package/decode.js +10 -0
- package/encode.d.ts +6 -0
- package/encode.js +10 -0
- package/{cast.d.ts → ensureInt.d.ts} +3 -1
- package/{cast.js → ensureInt.js} +3 -4
- package/findDuplicatedIndexes.d.ts +5 -0
- package/findDuplicatedIndexes.js +14 -0
- package/getKeys.d.ts +9 -0
- package/getKeys.js +9 -0
- package/getNonce.d.ts +6 -0
- package/getNonce.js +9 -0
- package/getType.d.ts +22 -0
- package/getType.js +19 -0
- package/getUrlHashParams.d.ts +9 -0
- package/getUrlHashParams.js +16 -0
- package/getUrlHashPathname.d.ts +9 -0
- package/getUrlHashPathname.js +13 -0
- package/getUrlPathnameParts.d.ts +12 -0
- package/getUrlPathnameParts.js +20 -0
- package/getUrlQueryParams.d.ts +14 -0
- package/getUrlQueryParams.js +38 -0
- package/index.d.ts +107 -15
- package/index.js +108 -16
- package/isAnyObject.d.ts +8 -0
- package/isAnyObject.js +10 -0
- package/isArray.d.ts +7 -0
- package/isArray.js +10 -0
- package/isBlob.d.ts +7 -0
- package/isBlob.js +10 -0
- package/isBoolean.d.ts +7 -0
- package/isBoolean.js +10 -0
- package/isBrowser.d.ts +6 -0
- package/{ssr.js → isBrowser.js} +5 -2
- package/isDate.d.ts +7 -0
- package/isDate.js +10 -0
- package/isEmptyArray.d.ts +7 -0
- package/isEmptyArray.js +10 -0
- package/isEmptyObject.d.ts +9 -0
- package/isEmptyObject.js +10 -0
- package/isEmptyString.d.ts +7 -0
- package/isEmptyString.js +9 -0
- package/isError.d.ts +7 -0
- package/isError.js +10 -0
- package/isExternalUrl.d.ts +9 -0
- package/isExternalUrl.js +21 -0
- package/isFile.d.ts +7 -0
- package/isFile.js +10 -0
- package/isFloat.d.ts +7 -0
- package/isFloat.js +10 -0
- package/isFormData.d.ts +7 -0
- package/isFormData.js +10 -0
- package/isFullArray.d.ts +7 -0
- package/isFullArray.js +10 -0
- package/isFullObject.d.ts +8 -0
- package/isFullObject.js +10 -0
- package/isFullString.d.ts +7 -0
- package/isFullString.js +10 -0
- package/isFunction.d.ts +8 -0
- package/isFunction.js +9 -0
- package/{detect.d.ts → isIE.d.ts} +3 -4
- package/isIE.js +18 -0
- package/isInt.d.ts +7 -0
- package/isInt.js +10 -0
- package/isMap.d.ts +7 -0
- package/isMap.js +10 -0
- package/isMobile.d.ts +7 -0
- package/{detect.js → isMobile.js} +4 -15
- package/isNaNValue.d.ts +7 -0
- package/isNaNValue.js +10 -0
- package/isNegativeNumber.d.ts +7 -0
- package/isNegativeNumber.js +10 -0
- package/isNull.d.ts +7 -0
- package/isNull.js +10 -0
- package/isNullOrUndefined.d.ts +7 -0
- package/isNullOrUndefined.js +10 -0
- package/isNumber.d.ts +9 -0
- package/isNumber.js +12 -0
- package/isObject.d.ts +8 -0
- package/isObject.js +10 -0
- package/isObjectLike.d.ts +10 -0
- package/isObjectLike.js +12 -0
- package/isOneOf.d.ts +9 -0
- package/isOneOf.js +10 -0
- package/isPlainObject.d.ts +8 -0
- package/isPlainObject.js +13 -0
- package/isPositiveNumber.d.ts +7 -0
- package/isPositiveNumber.js +10 -0
- package/isPrimitive.d.ts +7 -0
- package/isPrimitive.js +20 -0
- package/isPromise.d.ts +7 -0
- package/isPromise.js +10 -0
- package/isRegExp.d.ts +7 -0
- package/isRegExp.js +10 -0
- package/isServer.d.ts +6 -0
- package/isServer.js +8 -0
- package/isSet.d.ts +7 -0
- package/isSet.js +10 -0
- package/isString.d.ts +7 -0
- package/isString.js +10 -0
- package/isSymbol.d.ts +7 -0
- package/isSymbol.js +10 -0
- package/isType.d.ts +11 -0
- package/isType.js +22 -0
- package/isUndefined.d.ts +7 -0
- package/isUndefined.js +10 -0
- package/isWeakMap.d.ts +7 -0
- package/isWeakMap.js +10 -0
- package/isWeakSet.d.ts +7 -0
- package/isWeakSet.js +10 -0
- package/location.d.ts +2 -145
- package/location.js +1 -299
- package/mapListBy.d.ts +7 -0
- package/mapListBy.js +14 -0
- package/{match-sorter.d.ts → matchSorter.d.ts} +1 -0
- package/{match-sorter.js → matchSorter.js} +2 -1
- package/mergeObjects.d.ts +7 -0
- package/{objects.js → mergeObjects.js} +2 -31
- package/mergeUrlQueryParams.d.ts +9 -0
- package/mergeUrlQueryParams.js +22 -0
- package/navigateToHashParams.d.ts +9 -0
- package/navigateToHashParams.js +22 -0
- package/navigateToMergedHashParams.d.ts +8 -0
- package/navigateToMergedHashParams.js +14 -0
- package/navigateToMergedParams.d.ts +9 -0
- package/navigateToMergedParams.js +14 -0
- package/navigateToParams.d.ts +10 -0
- package/navigateToParams.js +18 -0
- package/navigateWithoutUrlParam.d.ts +8 -0
- package/navigateWithoutUrlParam.js +19 -0
- package/node/{async.js → Defer.js} +3 -9
- package/node/{emitter.js → Emitter.js} +1 -0
- package/node/accentSets.js +41 -0
- package/node/addOrReplaceAtIdx.js +23 -0
- package/node/arrayToLookup.js +17 -0
- package/node/buildUrlQueryString.js +28 -0
- package/node/changeUrlPath.js +22 -0
- package/node/chunkByChunks.js +41 -0
- package/node/chunkBySize.js +16 -0
- package/node/clamp.js +14 -0
- package/node/clsx.js +53 -0
- package/node/convertRange.js +20 -0
- package/node/cookie.js +4 -227
- package/node/decode.js +14 -0
- package/node/encode.js +14 -0
- package/node/{cast.js → ensureInt.js} +4 -6
- package/node/findDuplicatedIndexes.js +18 -0
- package/node/getKeys.js +12 -0
- package/node/getNonce.js +13 -0
- package/node/getType.js +23 -0
- package/node/getUrlHashParams.js +20 -0
- package/node/getUrlHashPathname.js +17 -0
- package/node/getUrlPathnameParts.js +24 -0
- package/node/getUrlQueryParams.js +42 -0
- package/node/index.js +108 -16
- package/node/isAnyObject.js +14 -0
- package/node/isArray.js +14 -0
- package/node/isBlob.js +14 -0
- package/node/isBoolean.js +14 -0
- package/node/{ssr.js → isBrowser.js} +6 -3
- package/node/isDate.js +14 -0
- package/node/isEmptyArray.js +14 -0
- package/node/isEmptyObject.js +14 -0
- package/node/isEmptyString.js +13 -0
- package/node/isError.js +14 -0
- package/node/isExternalUrl.js +25 -0
- package/node/isFile.js +14 -0
- package/node/isFloat.js +14 -0
- package/node/isFormData.js +14 -0
- package/node/isFullArray.js +14 -0
- package/node/isFullObject.js +14 -0
- package/node/isFullString.js +14 -0
- package/node/isFunction.js +13 -0
- package/node/isIE.js +22 -0
- package/node/isInt.js +14 -0
- package/node/isMap.js +14 -0
- package/node/{detect.js → isMobile.js} +6 -18
- package/node/isNaNValue.js +14 -0
- package/node/isNegativeNumber.js +14 -0
- package/node/isNull.js +14 -0
- package/node/isNullOrUndefined.js +13 -0
- package/node/isNumber.js +16 -0
- package/node/isObject.js +14 -0
- package/node/isObjectLike.js +16 -0
- package/node/isOneOf.js +14 -0
- package/node/isPlainObject.js +17 -0
- package/node/isPositiveNumber.js +14 -0
- package/node/isPrimitive.js +24 -0
- package/node/isPromise.js +14 -0
- package/node/isRegExp.js +14 -0
- package/node/isServer.js +11 -0
- package/node/isSet.js +14 -0
- package/node/isString.js +14 -0
- package/node/isSymbol.js +14 -0
- package/node/isType.js +26 -0
- package/node/isUndefined.js +14 -0
- package/node/isWeakMap.js +14 -0
- package/node/isWeakSet.js +14 -0
- package/node/location.js +0 -321
- package/node/mapListBy.js +18 -0
- package/node/{match-sorter.js → matchSorter.js} +3 -2
- package/node/{objects.js → mergeObjects.js} +5 -36
- package/node/mergeUrlQueryParams.js +26 -0
- package/node/navigateToHashParams.js +26 -0
- package/node/navigateToMergedHashParams.js +18 -0
- package/node/navigateToMergedParams.js +18 -0
- package/node/navigateToParams.js +22 -0
- package/node/navigateWithoutUrlParam.js +23 -0
- package/node/normaliseUrl.js +18 -0
- package/node/normaliseUrlPathname.js +18 -0
- package/node/{analytics-google.js → pageview.js} +12 -10
- package/node/parseCookie.js +52 -0
- package/node/parseURL.js +24 -0
- package/node/randomInt.js +13 -0
- package/node/{misc.js → randomKey.js} +2 -0
- package/node/readCookie.js +38 -0
- package/node/redirectTo.js +19 -0
- package/node/removeAccents.js +19 -0
- package/node/removeCookie.js +19 -0
- package/node/removeDuplicatesByKey.js +25 -0
- package/node/removeDuplicatesComparing.js +14 -0
- package/node/removeIndexesFromArray.js +18 -0
- package/node/removeTrailingSlash.js +14 -0
- package/node/{math.js → roundTo.js} +3 -32
- package/node/serializeCookie.js +108 -0
- package/node/setCookie.js +61 -0
- package/node/shuffle.js +36 -0
- package/node/slugify.js +27 -0
- package/node/swapMap.js +18 -0
- package/node/{typography.js → titleCase.js} +3 -12
- package/node/toNumber.js +12 -0
- package/node/{colors.js → toRgba.js} +4 -0
- package/node/transformToUrlPathname.js +20 -0
- package/node/truncate.js +17 -0
- package/node/uid.js +4 -13
- package/node/updateLinkParams.js +18 -0
- package/node/updateUrlQueryParams.js +22 -0
- package/node/uuid.js +17 -0
- package/node/wait.js +13 -0
- package/node/whitelistObject.js +19 -0
- package/normaliseUrl.d.ts +10 -0
- package/normaliseUrl.js +14 -0
- package/normaliseUrlPathname.d.ts +10 -0
- package/normaliseUrlPathname.js +14 -0
- package/package.json +1 -1
- package/{analytics-google.d.ts → pageview.d.ts} +3 -0
- package/{analytics-google.js → pageview.js} +12 -10
- package/parseCookie.d.ts +11 -0
- package/parseCookie.js +48 -0
- package/parseURL.d.ts +17 -0
- package/parseURL.js +20 -0
- package/randomInt.d.ts +7 -0
- package/randomInt.js +9 -0
- package/{misc.d.ts → randomKey.d.ts} +2 -0
- package/{misc.js → randomKey.js} +2 -0
- package/readCookie.d.ts +3 -0
- package/readCookie.js +34 -0
- package/redirectTo.d.ts +9 -0
- package/redirectTo.js +15 -0
- package/removeAccents.d.ts +6 -0
- package/removeAccents.js +15 -0
- package/removeCookie.d.ts +10 -0
- package/removeCookie.js +15 -0
- package/removeDuplicatesByKey.d.ts +8 -0
- package/removeDuplicatesByKey.js +21 -0
- package/removeDuplicatesComparing.d.ts +5 -0
- package/removeDuplicatesComparing.js +10 -0
- package/removeIndexesFromArray.d.ts +5 -0
- package/removeIndexesFromArray.js +14 -0
- package/removeTrailingSlash.d.ts +7 -0
- package/removeTrailingSlash.js +10 -0
- package/roundTo.d.ts +8 -0
- package/{math.js → roundTo.js} +2 -28
- package/serializeCookie.d.ts +27 -0
- package/serializeCookie.js +104 -0
- package/setCookie.d.ts +10 -0
- package/setCookie.js +57 -0
- package/shuffle.d.ts +16 -0
- package/shuffle.js +32 -0
- package/{text.d.ts → slugify.d.ts} +2 -5
- package/slugify.js +23 -0
- package/swapMap.d.ts +7 -0
- package/swapMap.js +14 -0
- package/{typography.d.ts → titleCase.d.ts} +2 -4
- package/{typography.js → titleCase.js} +2 -10
- package/toNumber.d.ts +5 -0
- package/toNumber.js +8 -0
- package/{colors.d.ts → toRgba.d.ts} +4 -0
- package/{colors.js → toRgba.js} +4 -0
- package/transformToUrlPathname.d.ts +11 -0
- package/transformToUrlPathname.js +16 -0
- package/truncate.d.ts +7 -0
- package/truncate.js +13 -0
- package/uid.d.ts +3 -6
- package/uid.js +3 -11
- package/updateLinkParams.d.ts +10 -0
- package/updateLinkParams.js +14 -0
- package/updateUrlQueryParams.d.ts +9 -0
- package/updateUrlQueryParams.js +18 -0
- package/uuid.d.ts +8 -0
- package/uuid.js +13 -0
- package/wait.d.ts +7 -0
- package/wait.js +9 -0
- package/whitelistObject.d.ts +8 -0
- package/whitelistObject.js +15 -0
- package/arrays.d.ts +0 -41
- package/arrays.js +0 -153
- package/is.d.ts +0 -288
- package/is.js +0 -376
- package/math.d.ts +0 -28
- package/node/arrays.js +0 -166
- package/node/is.js +0 -417
- package/node/security.js +0 -29
- package/node/text.js +0 -70
- package/objects.d.ts +0 -22
- package/security.d.ts +0 -12
- package/security.js +0 -23
- package/ssr.d.ts +0 -2
- package/text.js +0 -65
package/node/getKeys.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getKeys = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Type safe replacement for `Object.keys(myObject)` to iterate over a record
|
|
6
|
+
* without loosing the key's types in simple `string`s.
|
|
7
|
+
*
|
|
8
|
+
* @category objects
|
|
9
|
+
* @see https://stackoverflow.com/a/59459000/1938970
|
|
10
|
+
*/
|
|
11
|
+
exports.getKeys = Object.keys;
|
|
12
|
+
exports.default = exports.getKeys;
|
package/node/getNonce.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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/getType.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
*
|
|
5
|
+
* Same as [is-what](https://github.com/mesqueeb/is-what) plus:
|
|
6
|
+
*
|
|
7
|
+
* - `isFormData`
|
|
8
|
+
* - `isInt`
|
|
9
|
+
* - `isFloat`
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getType = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the object type of the given payload
|
|
15
|
+
*
|
|
16
|
+
* @param {*} payload
|
|
17
|
+
* @returns {string}
|
|
18
|
+
*/
|
|
19
|
+
function getType(payload) {
|
|
20
|
+
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
21
|
+
}
|
|
22
|
+
exports.getType = getType;
|
|
23
|
+
exports.default = getType;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUrlHashParams = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* It returns the "query params" as an object extracting it from the given `hash`
|
|
6
|
+
*string or, if not provided, failling back reading the `location.hash`
|
|
7
|
+
|
|
8
|
+
* @category location
|
|
9
|
+
*/
|
|
10
|
+
function getUrlHashParams(hash) {
|
|
11
|
+
if (hash === void 0) { hash = ""; }
|
|
12
|
+
hash = hash || location.hash;
|
|
13
|
+
var hashParts = hash.split("?");
|
|
14
|
+
if (hashParts.length >= 1) {
|
|
15
|
+
return Object.fromEntries(new URLSearchParams(hashParts[1]));
|
|
16
|
+
}
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
exports.getUrlHashParams = getUrlHashParams;
|
|
20
|
+
exports.default = getUrlHashParams;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUrlHashPathname = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* It returns the "pathname" cleaned up from the `#` and the initial slashes
|
|
6
|
+
* extracting it from the given `hash` string or, if not provided, failling
|
|
7
|
+
* back reading the `location.hash`
|
|
8
|
+
*
|
|
9
|
+
* @category location
|
|
10
|
+
*/
|
|
11
|
+
function getUrlHashPathname(hash) {
|
|
12
|
+
if (hash === void 0) { hash = ""; }
|
|
13
|
+
hash = hash || location.hash;
|
|
14
|
+
return hash.split("?")[0].replace(/^#\//, "");
|
|
15
|
+
}
|
|
16
|
+
exports.getUrlHashPathname = getUrlHashPathname;
|
|
17
|
+
exports.default = getUrlHashPathname;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUrlPathnameParts = void 0;
|
|
4
|
+
var isBrowser_1 = require("./isBrowser");
|
|
5
|
+
/**
|
|
6
|
+
* Get pathname parts
|
|
7
|
+
*
|
|
8
|
+
* First clean the pathname from the first slash if any then split the pathname
|
|
9
|
+
* in parts,
|
|
10
|
+
* Given a pathname like: `"/en/{prefix}/{collection}/{slug}"` we obtain
|
|
11
|
+
* `[locale, prefix, collection, slug]`
|
|
12
|
+
*
|
|
13
|
+
* @category location
|
|
14
|
+
*/
|
|
15
|
+
function getUrlPathnameParts(pathname) {
|
|
16
|
+
if (pathname === void 0) { pathname = ""; }
|
|
17
|
+
pathname = pathname || isBrowser_1.default ? location.pathname : "";
|
|
18
|
+
return pathname
|
|
19
|
+
.replace(/^\//, "")
|
|
20
|
+
.split("/")
|
|
21
|
+
.filter(function (part) { return part; });
|
|
22
|
+
}
|
|
23
|
+
exports.getUrlPathnameParts = getUrlPathnameParts;
|
|
24
|
+
exports.default = getUrlPathnameParts;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUrlQueryParams = void 0;
|
|
4
|
+
var isBrowser_1 = require("./isBrowser");
|
|
5
|
+
/**
|
|
6
|
+
* Get parsed query parameters as object dictionary (from URL or given query string)
|
|
7
|
+
*
|
|
8
|
+
* @category location
|
|
9
|
+
* @param url A URL which contains a `?`, e.g. `?myparam=x` or `https://a.com?myparams=x`.
|
|
10
|
+
* If not provided it defaults reading the current URL query string with
|
|
11
|
+
* `location.search`. Through this argument you can use this
|
|
12
|
+
* same function to parse, for instance, the query params of
|
|
13
|
+
* the `href` of a `<a href="...">` HTML tag.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
function getUrlQueryParams(url) {
|
|
17
|
+
var _a;
|
|
18
|
+
var params = {};
|
|
19
|
+
var search = url
|
|
20
|
+
? (_a = url.split("?")) === null || _a === void 0 ? void 0 : _a[1]
|
|
21
|
+
: isBrowser_1.default
|
|
22
|
+
? location.search.substring(1)
|
|
23
|
+
: "";
|
|
24
|
+
if (!search) {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
// @see https://stackoverflow.com/a/8649003/1938970
|
|
29
|
+
var paramsAsObj = "{\"".concat(search
|
|
30
|
+
.replace(/&/g, '","')
|
|
31
|
+
.replace(/=/g, '":"'), "\"}");
|
|
32
|
+
params = JSON.parse(paramsAsObj, function (key, value) {
|
|
33
|
+
return key === "" ? value : decodeURIComponent(value);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
// do nothing or warn on process.env["NODE_ENV"] !== "production"
|
|
38
|
+
}
|
|
39
|
+
return params;
|
|
40
|
+
}
|
|
41
|
+
exports.getUrlQueryParams = getUrlQueryParams;
|
|
42
|
+
exports.default = getUrlQueryParams;
|
package/node/index.js
CHANGED
|
@@ -28,22 +28,114 @@
|
|
|
28
28
|
*/
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
var tslib_1 = require("tslib");
|
|
31
|
-
tslib_1.__exportStar(require("./
|
|
32
|
-
tslib_1.__exportStar(require("./
|
|
33
|
-
tslib_1.__exportStar(require("./
|
|
34
|
-
tslib_1.__exportStar(require("./
|
|
31
|
+
tslib_1.__exportStar(require("./accentSets"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./addOrReplaceAtIdx"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./arrayToLookup"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./buildUrlQueryString"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./changeUrlPath"), exports);
|
|
36
|
+
tslib_1.__exportStar(require("./chunkByChunks"), exports);
|
|
37
|
+
tslib_1.__exportStar(require("./chunkBySize"), exports);
|
|
38
|
+
tslib_1.__exportStar(require("./clamp"), exports);
|
|
39
|
+
tslib_1.__exportStar(require("./clsx"), exports);
|
|
40
|
+
tslib_1.__exportStar(require("./convertRange"), exports);
|
|
35
41
|
tslib_1.__exportStar(require("./cookie"), exports);
|
|
36
|
-
tslib_1.__exportStar(require("./
|
|
37
|
-
|
|
38
|
-
tslib_1.__exportStar(require("./
|
|
39
|
-
tslib_1.__exportStar(require("./
|
|
42
|
+
tslib_1.__exportStar(require("./decode"), exports);
|
|
43
|
+
tslib_1.__exportStar(require("./Defer"), exports);
|
|
44
|
+
tslib_1.__exportStar(require("./Emitter"), exports);
|
|
45
|
+
tslib_1.__exportStar(require("./encode"), exports);
|
|
46
|
+
tslib_1.__exportStar(require("./ensureInt"), exports);
|
|
47
|
+
// export * from "./env"
|
|
48
|
+
tslib_1.__exportStar(require("./findDuplicatedIndexes"), exports);
|
|
49
|
+
tslib_1.__exportStar(require("./getKeys"), exports);
|
|
50
|
+
tslib_1.__exportStar(require("./getNonce"), exports);
|
|
51
|
+
tslib_1.__exportStar(require("./getType"), exports);
|
|
52
|
+
tslib_1.__exportStar(require("./getUrlHashParams"), exports);
|
|
53
|
+
tslib_1.__exportStar(require("./getUrlHashPathname"), exports);
|
|
54
|
+
tslib_1.__exportStar(require("./getUrlPathnameParts"), exports);
|
|
55
|
+
tslib_1.__exportStar(require("./getUrlQueryParams"), exports);
|
|
56
|
+
tslib_1.__exportStar(require("./index"), exports);
|
|
57
|
+
tslib_1.__exportStar(require("./isAnyObject"), exports);
|
|
58
|
+
tslib_1.__exportStar(require("./isArray"), exports);
|
|
59
|
+
tslib_1.__exportStar(require("./isBlob"), exports);
|
|
60
|
+
tslib_1.__exportStar(require("./isBoolean"), exports);
|
|
61
|
+
tslib_1.__exportStar(require("./isBrowser"), exports);
|
|
62
|
+
tslib_1.__exportStar(require("./isDate"), exports);
|
|
63
|
+
tslib_1.__exportStar(require("./isEmptyArray"), exports);
|
|
64
|
+
tslib_1.__exportStar(require("./isEmptyObject"), exports);
|
|
65
|
+
tslib_1.__exportStar(require("./isEmptyString"), exports);
|
|
66
|
+
tslib_1.__exportStar(require("./isError"), exports);
|
|
67
|
+
tslib_1.__exportStar(require("./isExternalUrl"), exports);
|
|
68
|
+
tslib_1.__exportStar(require("./isFile"), exports);
|
|
69
|
+
tslib_1.__exportStar(require("./isFloat"), exports);
|
|
70
|
+
tslib_1.__exportStar(require("./isFormData"), exports);
|
|
71
|
+
tslib_1.__exportStar(require("./isFullArray"), exports);
|
|
72
|
+
tslib_1.__exportStar(require("./isFullObject"), exports);
|
|
73
|
+
tslib_1.__exportStar(require("./isFullString"), exports);
|
|
74
|
+
tslib_1.__exportStar(require("./isFunction"), exports);
|
|
75
|
+
tslib_1.__exportStar(require("./isIE"), exports);
|
|
76
|
+
tslib_1.__exportStar(require("./isInt"), exports);
|
|
77
|
+
tslib_1.__exportStar(require("./isMap"), exports);
|
|
78
|
+
tslib_1.__exportStar(require("./isMobile"), exports);
|
|
79
|
+
tslib_1.__exportStar(require("./isNaNValue"), exports);
|
|
80
|
+
tslib_1.__exportStar(require("./isNegativeNumber"), exports);
|
|
81
|
+
tslib_1.__exportStar(require("./isNullOrUndefined"), exports);
|
|
82
|
+
tslib_1.__exportStar(require("./isNull"), exports);
|
|
83
|
+
tslib_1.__exportStar(require("./isNumber"), exports);
|
|
84
|
+
tslib_1.__exportStar(require("./isObjectLike"), exports);
|
|
85
|
+
tslib_1.__exportStar(require("./isObject"), exports);
|
|
86
|
+
tslib_1.__exportStar(require("./isOneOf"), exports);
|
|
87
|
+
tslib_1.__exportStar(require("./isPlainObject"), exports);
|
|
88
|
+
tslib_1.__exportStar(require("./isPositiveNumber"), exports);
|
|
89
|
+
tslib_1.__exportStar(require("./isPrimitive"), exports);
|
|
90
|
+
tslib_1.__exportStar(require("./isPromise"), exports);
|
|
91
|
+
tslib_1.__exportStar(require("./isRegExp"), exports);
|
|
92
|
+
tslib_1.__exportStar(require("./isServer"), exports);
|
|
93
|
+
tslib_1.__exportStar(require("./isSet"), exports);
|
|
94
|
+
tslib_1.__exportStar(require("./isString"), exports);
|
|
95
|
+
tslib_1.__exportStar(require("./isSymbol"), exports);
|
|
96
|
+
tslib_1.__exportStar(require("./isType"), exports);
|
|
97
|
+
tslib_1.__exportStar(require("./isUndefined"), exports);
|
|
98
|
+
tslib_1.__exportStar(require("./isWeakMap"), exports);
|
|
99
|
+
tslib_1.__exportStar(require("./isWeakSet"), exports);
|
|
40
100
|
tslib_1.__exportStar(require("./location"), exports);
|
|
41
|
-
tslib_1.__exportStar(require("./
|
|
42
|
-
tslib_1.__exportStar(require("./
|
|
43
|
-
tslib_1.__exportStar(require("./
|
|
44
|
-
tslib_1.__exportStar(require("./
|
|
45
|
-
tslib_1.__exportStar(require("./
|
|
46
|
-
tslib_1.__exportStar(require("./
|
|
47
|
-
tslib_1.__exportStar(require("./
|
|
48
|
-
tslib_1.__exportStar(require("./
|
|
101
|
+
tslib_1.__exportStar(require("./mapListBy"), exports);
|
|
102
|
+
tslib_1.__exportStar(require("./matchSorter"), exports);
|
|
103
|
+
tslib_1.__exportStar(require("./mergeObjects"), exports);
|
|
104
|
+
tslib_1.__exportStar(require("./mergeUrlQueryParams"), exports);
|
|
105
|
+
tslib_1.__exportStar(require("./navigateToHashParams"), exports);
|
|
106
|
+
tslib_1.__exportStar(require("./navigateToMergedHashParams"), exports);
|
|
107
|
+
tslib_1.__exportStar(require("./navigateToMergedParams"), exports);
|
|
108
|
+
tslib_1.__exportStar(require("./navigateToParams"), exports);
|
|
109
|
+
tslib_1.__exportStar(require("./navigateWithoutUrlParam"), exports);
|
|
110
|
+
tslib_1.__exportStar(require("./normaliseUrlPathname"), exports);
|
|
111
|
+
tslib_1.__exportStar(require("./normaliseUrl"), exports);
|
|
112
|
+
tslib_1.__exportStar(require("./pageview"), exports);
|
|
113
|
+
tslib_1.__exportStar(require("./parseCookie"), exports);
|
|
114
|
+
tslib_1.__exportStar(require("./parseURL"), exports);
|
|
115
|
+
tslib_1.__exportStar(require("./randomInt"), exports);
|
|
116
|
+
tslib_1.__exportStar(require("./randomKey"), exports);
|
|
117
|
+
tslib_1.__exportStar(require("./readCookie"), exports);
|
|
118
|
+
tslib_1.__exportStar(require("./redirectTo"), exports);
|
|
119
|
+
tslib_1.__exportStar(require("./removeAccents"), exports);
|
|
120
|
+
tslib_1.__exportStar(require("./removeCookie"), exports);
|
|
121
|
+
tslib_1.__exportStar(require("./removeDuplicatesByKey"), exports);
|
|
122
|
+
tslib_1.__exportStar(require("./removeDuplicatesComparing"), exports);
|
|
123
|
+
tslib_1.__exportStar(require("./removeIndexesFromArray"), exports);
|
|
124
|
+
tslib_1.__exportStar(require("./removeTrailingSlash"), exports);
|
|
125
|
+
tslib_1.__exportStar(require("./roundTo"), exports);
|
|
126
|
+
tslib_1.__exportStar(require("./serializeCookie"), exports);
|
|
127
|
+
tslib_1.__exportStar(require("./setCookie"), exports);
|
|
128
|
+
tslib_1.__exportStar(require("./shuffle"), exports);
|
|
129
|
+
tslib_1.__exportStar(require("./slugify"), exports);
|
|
130
|
+
tslib_1.__exportStar(require("./swapMap"), exports);
|
|
131
|
+
tslib_1.__exportStar(require("./titleCase"), exports);
|
|
132
|
+
tslib_1.__exportStar(require("./toNumber"), exports);
|
|
133
|
+
tslib_1.__exportStar(require("./toRgba"), exports);
|
|
134
|
+
tslib_1.__exportStar(require("./transformToUrlPathname"), exports);
|
|
135
|
+
tslib_1.__exportStar(require("./truncate"), exports);
|
|
49
136
|
tslib_1.__exportStar(require("./uid"), exports);
|
|
137
|
+
tslib_1.__exportStar(require("./updateLinkParams"), exports);
|
|
138
|
+
tslib_1.__exportStar(require("./updateUrlQueryParams"), exports);
|
|
139
|
+
tslib_1.__exportStar(require("./uuid"), exports);
|
|
140
|
+
tslib_1.__exportStar(require("./wait"), exports);
|
|
141
|
+
tslib_1.__exportStar(require("./whitelistObject"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAnyObject = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isAnyObject(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "Object";
|
|
12
|
+
}
|
|
13
|
+
exports.isAnyObject = isAnyObject;
|
|
14
|
+
exports.default = isAnyObject;
|
package/node/isArray.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isArray = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is an array
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isArray(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "Array";
|
|
12
|
+
}
|
|
13
|
+
exports.isArray = isArray;
|
|
14
|
+
exports.default = isArray;
|
package/node/isBlob.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBlob = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a Blob
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isBlob(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "Blob";
|
|
12
|
+
}
|
|
13
|
+
exports.isBlob = isBlob;
|
|
14
|
+
exports.default = isBlob;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBoolean = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a boolean
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isBoolean(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "Boolean";
|
|
12
|
+
}
|
|
13
|
+
exports.isBoolean = isBoolean;
|
|
14
|
+
exports.default = isBoolean;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// import { isUndefined } from "./is";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.isBrowser = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* @category ssr
|
|
7
|
+
* @category is
|
|
8
|
+
*/
|
|
5
9
|
exports.isBrowser = typeof window !== "undefined";
|
|
6
10
|
// export const isBrowser = () => !isUndefined(window);
|
|
7
|
-
exports.
|
|
8
|
-
// export const isServer = () => isUndefined(window);
|
|
11
|
+
exports.default = exports.isBrowser;
|
package/node/isDate.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDate = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a Date, and that the date is valid
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isDate(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "Date" && !isNaN(payload);
|
|
12
|
+
}
|
|
13
|
+
exports.isDate = isDate;
|
|
14
|
+
exports.default = isDate;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEmptyArray = void 0;
|
|
4
|
+
var isArray_1 = require("./isArray");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a an empty array
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isEmptyArray(payload) {
|
|
11
|
+
return (0, isArray_1.default)(payload) && payload.length === 0;
|
|
12
|
+
}
|
|
13
|
+
exports.isEmptyArray = isEmptyArray;
|
|
14
|
+
exports.default = isEmptyArray;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEmptyObject = void 0;
|
|
4
|
+
var isPlainObject_1 = require("./isPlainObject");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isEmptyObject(payload) {
|
|
11
|
+
return (0, isPlainObject_1.default)(payload) && Object.keys(payload).length === 0;
|
|
12
|
+
}
|
|
13
|
+
exports.isEmptyObject = isEmptyObject;
|
|
14
|
+
exports.default = isEmptyObject;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isError = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is an Error
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isError(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "Error";
|
|
12
|
+
}
|
|
13
|
+
exports.isError = isError;
|
|
14
|
+
exports.default = isError;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isExternalUrl = void 0;
|
|
4
|
+
var isBrowser_1 = require("./isBrowser");
|
|
5
|
+
/**
|
|
6
|
+
* Is external url compared to the given current URL (if not provided it falls
|
|
7
|
+
* back to `location.href`)
|
|
8
|
+
*
|
|
9
|
+
* @category location
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
function isExternalUrl(url, currentUrl) {
|
|
13
|
+
var _a;
|
|
14
|
+
var reg = /https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i;
|
|
15
|
+
var urlMatches = reg.exec(url);
|
|
16
|
+
// if no matches are found it means we either have an invalid URL, a relative
|
|
17
|
+
// URL or a hash link, and those are not considered externals
|
|
18
|
+
if (!urlMatches) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
currentUrl = currentUrl || isBrowser_1.default ? location.href : "";
|
|
22
|
+
return currentUrl ? ((_a = reg.exec(currentUrl)) === null || _a === void 0 ? void 0 : _a[1]) !== urlMatches[1] : true;
|
|
23
|
+
}
|
|
24
|
+
exports.isExternalUrl = isExternalUrl;
|
|
25
|
+
exports.default = isExternalUrl;
|
package/node/isFile.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFile = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a File
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isFile(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "File";
|
|
12
|
+
}
|
|
13
|
+
exports.isFile = isFile;
|
|
14
|
+
exports.default = isFile;
|
package/node/isFloat.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFloat = void 0;
|
|
4
|
+
var isNumber_1 = require("./isNumber");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a float number
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isFloat(payload) {
|
|
11
|
+
return (0, isNumber_1.default)(payload) && payload % 1 !== 0;
|
|
12
|
+
}
|
|
13
|
+
exports.isFloat = isFloat;
|
|
14
|
+
exports.default = isFloat;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFormData = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a FormData
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isFormData(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "FormData";
|
|
12
|
+
}
|
|
13
|
+
exports.isFormData = isFormData;
|
|
14
|
+
exports.default = isFormData;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFullArray = void 0;
|
|
4
|
+
var isArray_1 = require("./isArray");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a an array with at least 1 item
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isFullArray(payload) {
|
|
11
|
+
return (0, isArray_1.default)(payload) && payload.length > 0;
|
|
12
|
+
}
|
|
13
|
+
exports.isFullArray = isFullArray;
|
|
14
|
+
exports.default = isFullArray;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFullObject = void 0;
|
|
4
|
+
var isPlainObject_1 = require("./isPlainObject");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isFullObject(payload) {
|
|
11
|
+
return (0, isPlainObject_1.default)(payload) && Object.keys(payload).length > 0;
|
|
12
|
+
}
|
|
13
|
+
exports.isFullObject = isFullObject;
|
|
14
|
+
exports.default = isFullObject;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFullString = void 0;
|
|
4
|
+
var isString_1 = require("./isString");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a string, BUT returns false for ''
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isFullString(payload) {
|
|
11
|
+
return (0, isString_1.default)(payload) && payload !== "";
|
|
12
|
+
}
|
|
13
|
+
exports.isFullString = isFullString;
|
|
14
|
+
exports.default = isFullString;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFunction = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether the payload is a function (regular or async)
|
|
6
|
+
*
|
|
7
|
+
* @category is
|
|
8
|
+
*/
|
|
9
|
+
function isFunction(payload) {
|
|
10
|
+
return typeof payload === "function";
|
|
11
|
+
}
|
|
12
|
+
exports.isFunction = isFunction;
|
|
13
|
+
exports.default = isFunction;
|
package/node/isIE.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isIE = void 0;
|
|
4
|
+
var isServer_1 = require("./isServer");
|
|
5
|
+
/**
|
|
6
|
+
* @category detect
|
|
7
|
+
* @category is
|
|
8
|
+
* @see https://stackoverflow.com/a/21712356/12285349
|
|
9
|
+
*/
|
|
10
|
+
function isIE(ssrValue) {
|
|
11
|
+
if (ssrValue === void 0) { ssrValue = true; }
|
|
12
|
+
if (isServer_1.isServer) {
|
|
13
|
+
return ssrValue;
|
|
14
|
+
}
|
|
15
|
+
var ua = window.navigator.userAgent;
|
|
16
|
+
if (ua.indexOf("MSIE ") > 0 || ua.indexOf("Trident/") > 0) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
exports.isIE = isIE;
|
|
22
|
+
exports.default = isIE;
|
package/node/isInt.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInt = void 0;
|
|
4
|
+
var isNumber_1 = require("./isNumber");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is an integer number
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isInt(payload) {
|
|
11
|
+
return (0, isNumber_1.default)(payload) && payload % 1 === 0;
|
|
12
|
+
}
|
|
13
|
+
exports.isInt = isInt;
|
|
14
|
+
exports.default = isInt;
|
package/node/isMap.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isMap = void 0;
|
|
4
|
+
var getType_1 = require("./getType");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is a Map
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/
|
|
10
|
+
function isMap(payload) {
|
|
11
|
+
return (0, getType_1.default)(payload) === "Map";
|
|
12
|
+
}
|
|
13
|
+
exports.isMap = isMap;
|
|
14
|
+
exports.default = isMap;
|