@koine/utils 2.0.0-beta.82 → 2.0.0-beta.83
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.cjs.js +20 -1
- package/Defer.esm.js +20 -1
- package/Emitter.cjs.js +18 -1
- package/Emitter.esm.js +18 -1
- package/accentsSets.cjs.js +13 -1
- package/accentsSets.esm.js +13 -1
- package/addOrReplaceAtIdx.cjs.js +7 -1
- package/addOrReplaceAtIdx.esm.js +7 -1
- package/areEqual.cjs.js +28 -1
- package/areEqual.esm.js +28 -1
- package/arrayFilterFalsy.cjs.js +6 -1
- package/arrayFilterFalsy.esm.js +6 -1
- package/arrayFindLastIndex.cjs.js +13 -1
- package/arrayFindLastIndex.esm.js +13 -1
- package/arrayOfAll.cjs.js +16 -1
- package/arrayOfAll.esm.js +16 -1
- package/arraySum.cjs.js +6 -1
- package/arraySum.esm.js +6 -1
- package/arrayToLookup.cjs.js +5 -1
- package/arrayToLookup.esm.js +5 -1
- package/arrayUniqueByProperties.cjs.js +8 -1
- package/arrayUniqueByProperties.esm.js +8 -1
- package/buildUrlQueryString.cjs.js +10 -1
- package/buildUrlQueryString.esm.js +10 -1
- package/capitalize.cjs.js +7 -1
- package/capitalize.esm.js +7 -1
- package/changeCaseCamel.cjs.js +7 -1
- package/changeCaseCamel.esm.js +7 -1
- package/changeCaseCapital.cjs.js +7 -1
- package/changeCaseCapital.esm.js +7 -1
- package/changeCaseConstant.cjs.js +7 -1
- package/changeCaseConstant.esm.js +7 -1
- package/changeCaseDot.cjs.js +7 -1
- package/changeCaseDot.esm.js +7 -1
- package/changeCaseHelpers.cjs.js +32 -1
- package/changeCaseHelpers.esm.js +32 -1
- package/changeCaseKebab.cjs.js +7 -1
- package/changeCaseKebab.esm.js +7 -1
- package/changeCaseNone.cjs.js +7 -1
- package/changeCaseNone.esm.js +7 -1
- package/changeCasePascal.cjs.js +7 -1
- package/changeCasePascal.esm.js +7 -1
- package/changeCasePascalSnake.cjs.js +7 -1
- package/changeCasePascalSnake.esm.js +7 -1
- package/changeCasePath.cjs.js +7 -1
- package/changeCasePath.esm.js +7 -1
- package/changeCaseSentence.cjs.js +7 -1
- package/changeCaseSentence.esm.js +7 -1
- package/changeCaseSnake.cjs.js +7 -1
- package/changeCaseSnake.esm.js +7 -1
- package/changeCaseTrain.cjs.js +7 -1
- package/changeCaseTrain.esm.js +7 -1
- package/chunkByChunks.cjs.js +5 -1
- package/chunkByChunks.esm.js +5 -1
- package/chunkBySize.cjs.js +4 -1
- package/chunkBySize.esm.js +4 -1
- package/clamp.cjs.js +6 -1
- package/clamp.esm.js +6 -1
- package/clsx.cjs.js +2 -1
- package/clsx.esm.js +2 -1
- package/convertRange.cjs.js +14 -1
- package/convertRange.esm.js +14 -1
- package/cookie.cjs.js +44 -1
- package/cookie.esm.js +44 -1
- package/createPalette.cjs.js +17 -1
- package/createPalette.esm.js +17 -1
- package/debounce.cjs.js +7 -1
- package/debounce.esm.js +7 -1
- package/debouncePromise.cjs.js +10 -1
- package/debouncePromise.esm.js +10 -1
- package/debounceRaf.cjs.js +4 -1
- package/debounceRaf.esm.js +4 -1
- package/decode.cjs.js +4 -1
- package/decode.esm.js +4 -1
- package/encode.cjs.js +4 -1
- package/encode.esm.js +4 -1
- package/ensureInt.cjs.js +5 -1
- package/ensureInt.esm.js +5 -1
- package/errorToString.cjs.js +6 -1
- package/errorToString.esm.js +6 -1
- package/escapeRegExp.cjs.js +7 -1
- package/escapeRegExp.esm.js +7 -1
- package/findDuplicatedIndexes.cjs.js +3 -1
- package/findDuplicatedIndexes.esm.js +3 -1
- package/forin.cjs.js +6 -1
- package/forin.esm.js +6 -1
- package/gbToBytes.cjs.js +5 -1
- package/gbToBytes.esm.js +5 -1
- package/getEmptyArray.cjs.js +6 -1
- package/getEmptyArray.esm.js +6 -1
- package/getKeys.cjs.js +8 -1
- package/getKeys.esm.js +8 -1
- package/getMediaQueryWidthResolvers.cjs.js +27 -1
- package/getMediaQueryWidthResolvers.esm.js +27 -1
- package/getMediaQueryWidthTailwindScreens.cjs.js +6 -1
- package/getMediaQueryWidthTailwindScreens.esm.js +6 -1
- package/getNonce.cjs.js +4 -1
- package/getNonce.esm.js +4 -1
- package/getParamAmong.cjs.js +11 -1
- package/getParamAmong.esm.js +11 -1
- package/getParamAsInt.cjs.js +10 -1
- package/getParamAsInt.esm.js +10 -1
- package/getParamAsString.cjs.js +9 -1
- package/getParamAsString.esm.js +9 -1
- package/getType.cjs.js +13 -1
- package/getType.esm.js +13 -1
- package/getUrlHashParams.cjs.js +6 -1
- package/getUrlHashParams.esm.js +6 -1
- package/getUrlHashPathname.cjs.js +7 -1
- package/getUrlHashPathname.esm.js +7 -1
- package/getUrlPathnameParts.cjs.js +10 -1
- package/getUrlPathnameParts.esm.js +10 -1
- package/getUrlQueryParams.cjs.js +12 -1
- package/getUrlQueryParams.esm.js +12 -1
- package/hashAny.cjs.js +30 -1
- package/hashAny.esm.js +30 -1
- package/imgEmptyPixel.cjs.js +5 -1
- package/imgEmptyPixel.esm.js +5 -1
- package/invariant.cjs.js +17 -1
- package/invariant.esm.js +17 -1
- package/isAbsoluteUrl.cjs.js +5 -1
- package/isAbsoluteUrl.esm.js +5 -1
- package/isAnyObject.cjs.js +5 -1
- package/isAnyObject.esm.js +5 -1
- package/isArray.cjs.js +5 -1
- package/isArray.esm.js +5 -1
- package/isBlob.cjs.js +5 -1
- package/isBlob.esm.js +5 -1
- package/isBoolean.cjs.js +5 -1
- package/isBoolean.esm.js +5 -1
- package/isBrowser.cjs.js +4 -1
- package/isBrowser.esm.js +4 -1
- package/isBrowserNow.cjs.js +4 -1
- package/isBrowserNow.esm.js +4 -1
- package/isDate.cjs.js +5 -1
- package/isDate.esm.js +5 -1
- package/isEmptyArray.cjs.js +5 -1
- package/isEmptyArray.esm.js +5 -1
- package/isEmptyObject.cjs.js +5 -1
- package/isEmptyObject.esm.js +5 -1
- package/isEmptyString.cjs.js +5 -1
- package/isEmptyString.esm.js +5 -1
- package/isError.cjs.js +5 -1
- package/isError.esm.js +5 -1
- package/isExternalUrl.cjs.js +9 -1
- package/isExternalUrl.esm.js +9 -1
- package/isFile.cjs.js +5 -1
- package/isFile.esm.js +5 -1
- package/isFloat.cjs.js +5 -1
- package/isFloat.esm.js +5 -1
- package/isFormData.cjs.js +5 -1
- package/isFormData.esm.js +5 -1
- package/isFullArray.cjs.js +5 -1
- package/isFullArray.esm.js +5 -1
- package/isFullObject.cjs.js +5 -1
- package/isFullObject.esm.js +5 -1
- package/isFullString.cjs.js +5 -1
- package/isFullString.esm.js +5 -1
- package/isFunction.cjs.js +5 -1
- package/isFunction.esm.js +5 -1
- package/isInt.cjs.js +5 -1
- package/isInt.esm.js +5 -1
- package/isMap.cjs.js +5 -1
- package/isMap.esm.js +5 -1
- package/isNaNValue.cjs.js +5 -1
- package/isNaNValue.esm.js +5 -1
- package/isNegativeNumber.cjs.js +5 -1
- package/isNegativeNumber.esm.js +5 -1
- package/isNull.cjs.js +5 -1
- package/isNull.esm.js +5 -1
- package/isNullOrUndefined.cjs.js +5 -1
- package/isNullOrUndefined.esm.js +5 -1
- package/isNumber.cjs.js +7 -1
- package/isNumber.esm.js +7 -1
- package/isNumericLiteral.cjs.js +8 -1
- package/isNumericLiteral.esm.js +8 -1
- package/isObject.cjs.js +5 -1
- package/isObject.esm.js +5 -1
- package/isObjectLike.cjs.js +7 -1
- package/isObjectLike.esm.js +7 -1
- package/isObjectStringKeyed.cjs.js +9 -1
- package/isObjectStringKeyed.esm.js +9 -1
- package/isOneOf.cjs.js +3 -1
- package/isOneOf.esm.js +3 -1
- package/isPlainObject.cjs.js +5 -1
- package/isPlainObject.esm.js +5 -1
- package/isPositiveNumber.cjs.js +5 -1
- package/isPositiveNumber.esm.js +5 -1
- package/isPrimitive.cjs.js +5 -1
- package/isPrimitive.esm.js +5 -1
- package/isPromise.cjs.js +5 -1
- package/isPromise.esm.js +5 -1
- package/isRegExp.cjs.js +5 -1
- package/isRegExp.esm.js +5 -1
- package/isServer.cjs.js +4 -1
- package/isServer.esm.js +4 -1
- package/isServerNow.cjs.js +4 -1
- package/isServerNow.esm.js +4 -1
- package/isSet.cjs.js +5 -1
- package/isSet.esm.js +5 -1
- package/isString.cjs.js +5 -1
- package/isString.esm.js +5 -1
- package/isSymbol.cjs.js +5 -1
- package/isSymbol.esm.js +5 -1
- package/isType.cjs.js +9 -1
- package/isType.esm.js +9 -1
- package/isUndefined.cjs.js +5 -1
- package/isUndefined.esm.js +5 -1
- package/isWeakMap.cjs.js +5 -1
- package/isWeakMap.esm.js +5 -1
- package/isWeakSet.cjs.js +5 -1
- package/isWeakSet.esm.js +5 -1
- package/kbToBytes.cjs.js +5 -1
- package/kbToBytes.esm.js +5 -1
- package/lowercase.cjs.js +5 -1
- package/lowercase.esm.js +5 -1
- package/mapListBy.cjs.js +5 -1
- package/mapListBy.esm.js +5 -1
- package/matchSorter.cjs.js +90 -1
- package/matchSorter.esm.js +90 -1
- package/mbToBytes.cjs.js +5 -1
- package/mbToBytes.esm.js +5 -1
- package/mergeObjects.cjs.js +8 -1
- package/mergeObjects.esm.js +8 -1
- package/mergeUrlQueryParams.cjs.js +5 -1
- package/mergeUrlQueryParams.esm.js +5 -1
- package/moveSortableArrayItemByKey.cjs.js +7 -1
- package/moveSortableArrayItemByKey.esm.js +7 -1
- package/noop.cjs.js +5 -1
- package/noop.esm.js +5 -1
- package/normaliseUrl.cjs.js +9 -1
- package/normaliseUrl.esm.js +9 -1
- package/normaliseUrlPathname.cjs.js +8 -1
- package/normaliseUrlPathname.esm.js +8 -1
- package/objectFlat.cjs.js +8 -1
- package/objectFlat.esm.js +8 -1
- package/objectFlip.cjs.js +4 -1
- package/objectFlip.esm.js +4 -1
- package/objectMergeWithDefaults.cjs.js +29 -1
- package/objectMergeWithDefaults.esm.js +29 -1
- package/objectOmit.cjs.js +9 -1
- package/objectOmit.esm.js +9 -1
- package/objectPick.cjs.js +6 -1
- package/objectPick.esm.js +6 -1
- package/objectSort.cjs.js +8 -1
- package/objectSort.esm.js +8 -1
- package/objectSortByKeysMatching.cjs.js +9 -1
- package/objectSortByKeysMatching.esm.js +9 -1
- package/objectToArray.cjs.js +6 -1
- package/objectToArray.esm.js +6 -1
- package/package.json +1 -1
- package/parseCookie.cjs.js +13 -1
- package/parseCookie.esm.js +13 -1
- package/parseURL.cjs.js +6 -1
- package/parseURL.esm.js +6 -1
- package/quaranteneProps.cjs.js +17 -1
- package/quaranteneProps.esm.js +17 -1
- package/randomInt.cjs.js +5 -1
- package/randomInt.esm.js +5 -1
- package/randomKey.cjs.js +6 -1
- package/randomKey.esm.js +6 -1
- package/readCookie.cjs.js +5 -1
- package/readCookie.esm.js +5 -1
- package/removeAccents.cjs.js +3 -1
- package/removeAccents.esm.js +3 -1
- package/removeCookie.cjs.js +3 -1
- package/removeCookie.esm.js +3 -1
- package/removeDuplicates.cjs.js +8 -1
- package/removeDuplicates.esm.js +8 -1
- package/removeDuplicatesByKey.cjs.js +6 -1
- package/removeDuplicatesByKey.esm.js +6 -1
- package/removeDuplicatesComparing.cjs.js +3 -1
- package/removeDuplicatesComparing.esm.js +3 -1
- package/removeIndexesFromArray.cjs.js +4 -1
- package/removeIndexesFromArray.esm.js +4 -1
- package/removeTrailingSlash.cjs.js +5 -1
- package/removeTrailingSlash.esm.js +5 -1
- package/removeUrlQueryParams.cjs.js +5 -1
- package/removeUrlQueryParams.esm.js +5 -1
- package/render.cjs.js +52 -1
- package/render.esm.js +52 -1
- package/round.cjs.js +11 -1
- package/round.esm.js +11 -1
- package/roundTo.cjs.js +22 -1
- package/roundTo.esm.js +22 -1
- package/serializeCookie.cjs.js +13 -1
- package/serializeCookie.esm.js +13 -1
- package/setCookie.cjs.js +11 -1
- package/setCookie.esm.js +11 -1
- package/shuffle.cjs.js +15 -1
- package/shuffle.esm.js +15 -1
- package/slugify.cjs.js +19 -1
- package/slugify.esm.js +19 -1
- package/split.cjs.js +6 -1
- package/split.esm.js +6 -1
- package/splitReverse.cjs.js +6 -1
- package/splitReverse.esm.js +6 -1
- package/swapMap.cjs.js +5 -1
- package/swapMap.esm.js +5 -1
- package/throttle.cjs.js +6 -1
- package/throttle.esm.js +6 -1
- package/toNumber.cjs.js +5 -1
- package/toNumber.esm.js +5 -1
- package/toRgba.cjs.js +5 -1
- package/toRgba.esm.js +5 -1
- package/transformToUrlPathname.cjs.js +9 -1
- package/transformToUrlPathname.esm.js +9 -1
- package/truncate.cjs.js +5 -1
- package/truncate.esm.js +5 -1
- package/tryUntil.cjs.js +14 -1
- package/tryUntil.esm.js +14 -1
- package/uid.cjs.js +5 -1
- package/uid.esm.js +5 -1
- package/updateLinkParams.cjs.js +7 -1
- package/updateLinkParams.esm.js +7 -1
- package/updateUrlQueryParams.cjs.js +5 -1
- package/updateUrlQueryParams.esm.js +5 -1
- package/uppercase.cjs.js +6 -1
- package/uppercase.esm.js +6 -1
- package/uuid.cjs.js +6 -1
- package/uuid.esm.js +6 -1
- package/uuidNumeric.cjs.js +4 -1
- package/uuidNumeric.esm.js +4 -1
- package/wait.cjs.js +5 -1
- package/wait.esm.js +5 -1
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* It returns the "pathname" cleaned up from the `#` and the initial slashes
|
|
7
|
+
* extracting it from the given `hash` string or, if not provided, failling
|
|
8
|
+
* back reading the `location.hash`
|
|
9
|
+
*
|
|
10
|
+
* @category location
|
|
11
|
+
*/let getUrlHashPathname=(a="")=>(a||location.hash).split("?")[0].replace(/^#\//,"");
|
|
6
12
|
|
|
7
13
|
exports["default"] = getUrlHashPathname;
|
|
8
14
|
exports.getUrlHashPathname = getUrlHashPathname;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* It returns the "pathname" cleaned up from the `#` and the initial slashes
|
|
3
|
+
* extracting it from the given `hash` string or, if not provided, failling
|
|
4
|
+
* back reading the `location.hash`
|
|
5
|
+
*
|
|
6
|
+
* @category location
|
|
7
|
+
*/let getUrlHashPathname=(a="")=>(a||location.hash).split("?")[0].replace(/^#\//,"");
|
|
2
8
|
|
|
3
9
|
export { getUrlHashPathname as default, getUrlHashPathname };
|
|
@@ -4,7 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var isBrowser = require('./isBrowser.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Get pathname parts
|
|
9
|
+
*
|
|
10
|
+
* First clean the pathname from the first slash if any then split the pathname
|
|
11
|
+
* in parts,
|
|
12
|
+
* Given a pathname like: `"/en/{prefix}/{collection}/{slug}"` we obtain
|
|
13
|
+
* `[locale, prefix, collection, slug]`
|
|
14
|
+
*
|
|
15
|
+
* @category location
|
|
16
|
+
*/let getUrlPathnameParts=(e="")=>(e||(isBrowser.isBrowser?location.pathname:"")).replace(/^\//,"").split("/").filter(Boolean);
|
|
8
17
|
|
|
9
18
|
exports["default"] = getUrlPathnameParts;
|
|
10
19
|
exports.getUrlPathnameParts = getUrlPathnameParts;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { isBrowser } from './isBrowser.esm.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Get pathname parts
|
|
5
|
+
*
|
|
6
|
+
* First clean the pathname from the first slash if any then split the pathname
|
|
7
|
+
* in parts,
|
|
8
|
+
* Given a pathname like: `"/en/{prefix}/{collection}/{slug}"` we obtain
|
|
9
|
+
* `[locale, prefix, collection, slug]`
|
|
10
|
+
*
|
|
11
|
+
* @category location
|
|
12
|
+
*/let getUrlPathnameParts=(e="")=>(e||(isBrowser?location.pathname:"")).replace(/^\//,"").split("/").filter(Boolean);
|
|
4
13
|
|
|
5
14
|
export { getUrlPathnameParts as default, getUrlPathnameParts };
|
package/getUrlQueryParams.cjs.js
CHANGED
|
@@ -4,7 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var isBrowser = require('./isBrowser.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Get parsed query parameters as object dictionary (from URL or given query string)
|
|
9
|
+
*
|
|
10
|
+
* @category location
|
|
11
|
+
* @param url A URL which contains a `?`, e.g. `?myparam=x` or `https://a.com?myparams=x`.
|
|
12
|
+
* If not provided it defaults reading the current URL query string with
|
|
13
|
+
* `location.search`. Through this argument you can use this same function to
|
|
14
|
+
* parse, for instance, the query params of the `href` of a `<a href="...">` HTML tag.
|
|
15
|
+
*
|
|
16
|
+
*/let getUrlQueryParams=r=>{let t={},a=r?r.split("?")?.[1]:isBrowser.isBrowser?location.search.substring(1):"";if(!a)return {};try{// @see https://stackoverflow.com/a/8649003/1938970
|
|
17
|
+
let e=`{"${a.replace(/&/g,'","').replace(/=/g,'":"')}"}`;t=JSON.parse(e,(e,r)=>""===e?r:decodeURIComponent(r));}catch(e){}// do nothing or warn on process.env["NODE_ENV"] === "development"
|
|
18
|
+
return t};
|
|
8
19
|
|
|
9
20
|
exports["default"] = getUrlQueryParams;
|
|
10
21
|
exports.getUrlQueryParams = getUrlQueryParams;
|
package/getUrlQueryParams.esm.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { isBrowser } from './isBrowser.esm.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Get parsed query parameters as object dictionary (from URL or given query string)
|
|
5
|
+
*
|
|
6
|
+
* @category location
|
|
7
|
+
* @param url A URL which contains a `?`, e.g. `?myparam=x` or `https://a.com?myparams=x`.
|
|
8
|
+
* If not provided it defaults reading the current URL query string with
|
|
9
|
+
* `location.search`. Through this argument you can use this same function to
|
|
10
|
+
* parse, for instance, the query params of the `href` of a `<a href="...">` HTML tag.
|
|
11
|
+
*
|
|
12
|
+
*/let getUrlQueryParams=r=>{let t={},a=r?r.split("?")?.[1]:isBrowser?location.search.substring(1):"";if(!a)return {};try{// @see https://stackoverflow.com/a/8649003/1938970
|
|
13
|
+
let e=`{"${a.replace(/&/g,'","').replace(/=/g,'":"')}"}`;t=JSON.parse(e,(e,r)=>""===e?r:decodeURIComponent(r));}catch(e){}// do nothing or warn on process.env["NODE_ENV"] === "development"
|
|
14
|
+
return t};
|
|
4
15
|
|
|
5
16
|
export { getUrlQueryParams as default, getUrlQueryParams };
|
package/hashAny.cjs.js
CHANGED
|
@@ -5,7 +5,36 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var isUndefined = require('./isUndefined.cjs.js');
|
|
6
6
|
require('./getType.cjs.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */// import { OBJECT, isUndefined } from './shared'
|
|
9
|
+
let e=Object,// use WeakMap to store the object->key mapping
|
|
10
|
+
// so the objects can be garbage collected.
|
|
11
|
+
// WeakMap uses a hashtable under the hood, so the lookup
|
|
12
|
+
// complexity is almost O(1).
|
|
13
|
+
r=new WeakMap,// counter of the key
|
|
14
|
+
s=0;/**
|
|
15
|
+
* A stable hash implementation that supports:
|
|
16
|
+
* - Fast and ensures unique hash properties
|
|
17
|
+
* - Handles unserializable values
|
|
18
|
+
* - Handles object key ordering
|
|
19
|
+
* - Generates short results
|
|
20
|
+
*
|
|
21
|
+
* This is not a serialization function, and the result is not guaranteed to be
|
|
22
|
+
* parsable.
|
|
23
|
+
*
|
|
24
|
+
* @borrows [`swr`'s `stableHash`](https://github.com/vercel/swr/blob/main/src/_internal/utils/shared.ts)
|
|
25
|
+
*
|
|
26
|
+
* That is not exported by the package, the following is not possible:
|
|
27
|
+
* ```js
|
|
28
|
+
* import { stableHash } from "swr/_internal/dist";
|
|
29
|
+
* ```
|
|
30
|
+
*/const hashAny=n=>{let o,f;let i=typeof n,a=n&&n.constructor,h=a==Date;if(e(n)!==n||h||a==RegExp)o=h?n.toJSON():"symbol"==i?n.toString():"string"==i?JSON.stringify(n):""+n;else {if(// Object/function, not null/date/regexp. Use WeakMap to store the id first.
|
|
31
|
+
// If it's already hashed, directly return the result.
|
|
32
|
+
o=r.get(n))return o;if(// Store the hash first for circular reference detection before entering the
|
|
33
|
+
// recursive `hashAny` calls.
|
|
34
|
+
// For other objects like set and map, we use this id directly as the hash.
|
|
35
|
+
o=++s+"~",r.set(n,o),a==Array){for(f=0,// Array.
|
|
36
|
+
o="@";f<n.length;f++)o+=hashAny(n[f])+",";r.set(n,o);}if(a==e){// Object, sort keys.
|
|
37
|
+
o="#";let s=e.keys(n).sort();for(;!isUndefined.isUndefined(f=s.pop());)isUndefined.isUndefined(n[f])||(o+=f+":"+hashAny(n[f])+",");r.set(n,o);}}return o};
|
|
9
38
|
|
|
10
39
|
exports["default"] = hashAny;
|
|
11
40
|
exports.hashAny = hashAny;
|
package/hashAny.esm.js
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import { isUndefined } from './isUndefined.esm.js';
|
|
2
2
|
import './getType.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */// import { OBJECT, isUndefined } from './shared'
|
|
5
|
+
let e=Object,// use WeakMap to store the object->key mapping
|
|
6
|
+
// so the objects can be garbage collected.
|
|
7
|
+
// WeakMap uses a hashtable under the hood, so the lookup
|
|
8
|
+
// complexity is almost O(1).
|
|
9
|
+
r=new WeakMap,// counter of the key
|
|
10
|
+
s=0;/**
|
|
11
|
+
* A stable hash implementation that supports:
|
|
12
|
+
* - Fast and ensures unique hash properties
|
|
13
|
+
* - Handles unserializable values
|
|
14
|
+
* - Handles object key ordering
|
|
15
|
+
* - Generates short results
|
|
16
|
+
*
|
|
17
|
+
* This is not a serialization function, and the result is not guaranteed to be
|
|
18
|
+
* parsable.
|
|
19
|
+
*
|
|
20
|
+
* @borrows [`swr`'s `stableHash`](https://github.com/vercel/swr/blob/main/src/_internal/utils/shared.ts)
|
|
21
|
+
*
|
|
22
|
+
* That is not exported by the package, the following is not possible:
|
|
23
|
+
* ```js
|
|
24
|
+
* import { stableHash } from "swr/_internal/dist";
|
|
25
|
+
* ```
|
|
26
|
+
*/const hashAny=n=>{let o,f;let i=typeof n,a=n&&n.constructor,h=a==Date;if(e(n)!==n||h||a==RegExp)o=h?n.toJSON():"symbol"==i?n.toString():"string"==i?JSON.stringify(n):""+n;else {if(// Object/function, not null/date/regexp. Use WeakMap to store the id first.
|
|
27
|
+
// If it's already hashed, directly return the result.
|
|
28
|
+
o=r.get(n))return o;if(// Store the hash first for circular reference detection before entering the
|
|
29
|
+
// recursive `hashAny` calls.
|
|
30
|
+
// For other objects like set and map, we use this id directly as the hash.
|
|
31
|
+
o=++s+"~",r.set(n,o),a==Array){for(f=0,// Array.
|
|
32
|
+
o="@";f<n.length;f++)o+=hashAny(n[f])+",";r.set(n,o);}if(a==e){// Object, sort keys.
|
|
33
|
+
o="#";let s=e.keys(n).sort();for(;!isUndefined(f=s.pop());)isUndefined(n[f])||(o+=f+":"+hashAny(n[f])+",");r.set(n,o);}}return o};
|
|
5
34
|
|
|
6
35
|
export { hashAny as default, hashAny };
|
package/imgEmptyPixel.cjs.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Empty img pixel as a string to inline
|
|
7
|
+
*
|
|
8
|
+
* @category img
|
|
9
|
+
*/let imgEmptyPixel="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
|
|
6
10
|
|
|
7
11
|
exports["default"] = imgEmptyPixel;
|
|
8
12
|
exports.imgEmptyPixel = imgEmptyPixel;
|
package/imgEmptyPixel.esm.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Empty img pixel as a string to inline
|
|
3
|
+
*
|
|
4
|
+
* @category img
|
|
5
|
+
*/let imgEmptyPixel="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
|
|
2
6
|
|
|
3
7
|
export { imgEmptyPixel as default, imgEmptyPixel };
|
package/invariant.cjs.js
CHANGED
|
@@ -2,7 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* FIXME: invariant calls do not get tree shaked in minified output of projects
|
|
7
|
+
* using it. Let's not use it internally and not export it from `@koine/utils`
|
|
8
|
+
* until we find a tree-shakeable way of doing this. For now just wrapping
|
|
9
|
+
* the logging code into `if (process.env["NODE_ENV"] === "development") {}`
|
|
10
|
+
* works better despite it is more verbose.
|
|
11
|
+
*
|
|
12
|
+
* @resources
|
|
13
|
+
* - https://github.com/alexreardon/tiny-invariant
|
|
14
|
+
* - https://github.com/zertosh/invariant
|
|
15
|
+
* - https://stackoverflow.com/q/39055159/1938970
|
|
16
|
+
*
|
|
17
|
+
* @param condition The condition that, if `true` will throw the error during development
|
|
18
|
+
* @param message A string or a function that returns a string
|
|
19
|
+
* @param lib The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
20
|
+
* @param prefix The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
21
|
+
*/let invariant=(e,t,r,n)=>{if("development"===process.env.NODE_ENV){if(e)return;let o="function"==typeof t?t():t,i="";throw r&&n?i=`[${r}:${n}] `:r&&(i=`[${r}] `),Error(i+o)}};
|
|
6
22
|
|
|
7
23
|
exports["default"] = invariant;
|
|
8
24
|
exports.invariant = invariant;
|
package/invariant.esm.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* FIXME: invariant calls do not get tree shaked in minified output of projects
|
|
3
|
+
* using it. Let's not use it internally and not export it from `@koine/utils`
|
|
4
|
+
* until we find a tree-shakeable way of doing this. For now just wrapping
|
|
5
|
+
* the logging code into `if (process.env["NODE_ENV"] === "development") {}`
|
|
6
|
+
* works better despite it is more verbose.
|
|
7
|
+
*
|
|
8
|
+
* @resources
|
|
9
|
+
* - https://github.com/alexreardon/tiny-invariant
|
|
10
|
+
* - https://github.com/zertosh/invariant
|
|
11
|
+
* - https://stackoverflow.com/q/39055159/1938970
|
|
12
|
+
*
|
|
13
|
+
* @param condition The condition that, if `true` will throw the error during development
|
|
14
|
+
* @param message A string or a function that returns a string
|
|
15
|
+
* @param lib The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
16
|
+
* @param prefix The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
17
|
+
*/let invariant=(e,t,r,n)=>{if("development"===process.env.NODE_ENV){if(e)return;let o="function"==typeof t?t():t,i="";throw r&&n?i=`[${r}:${n}] `:r&&(i=`[${r}] `),Error(i+o)}};
|
|
2
18
|
|
|
3
19
|
export { invariant as default, invariant };
|
package/isAbsoluteUrl.cjs.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
let t=/^(?:[a-z+]+:)?\/\//i
|
|
5
|
+
let t=/^(?:[a-z+]+:)?\/\//i;/**
|
|
6
|
+
* @borrows [SO's answer](https://stackoverflow.com/a/19709846/1938970)
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/let isAbsoluteUrl=e=>t.test(e);
|
|
6
10
|
|
|
7
11
|
exports["default"] = isAbsoluteUrl;
|
|
8
12
|
exports.isAbsoluteUrl = isAbsoluteUrl;
|
package/isAbsoluteUrl.esm.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
let t=/^(?:[a-z+]+:)?\/\//i
|
|
1
|
+
let t=/^(?:[a-z+]+:)?\/\//i;/**
|
|
2
|
+
* @borrows [SO's answer](https://stackoverflow.com/a/19709846/1938970)
|
|
3
|
+
*
|
|
4
|
+
* @category is
|
|
5
|
+
*/let isAbsoluteUrl=e=>t.test(e);
|
|
2
6
|
|
|
3
7
|
export { isAbsoluteUrl as default, isAbsoluteUrl };
|
package/isAnyObject.cjs.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var getType = require('./getType.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
|
|
9
|
+
*
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isAnyObject=t=>"Object"===getType.getType(t);
|
|
8
12
|
|
|
9
13
|
exports["default"] = isAnyObject;
|
|
10
14
|
exports.isAnyObject = isAnyObject;
|
package/isAnyObject.esm.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { getType } from './getType.esm.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
|
|
5
|
+
*
|
|
6
|
+
* @category is
|
|
7
|
+
*/let isAnyObject=t=>"Object"===getType(t);
|
|
4
8
|
|
|
5
9
|
export { isAnyObject as default, isAnyObject };
|
package/isArray.cjs.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var getType = require('./getType.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the payload is an array
|
|
9
|
+
*
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isArray=e=>"Array"===getType.getType(e);
|
|
8
12
|
|
|
9
13
|
exports["default"] = isArray;
|
|
10
14
|
exports.isArray = isArray;
|
package/isArray.esm.js
CHANGED
package/isBlob.cjs.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var getType = require('./getType.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the payload is a Blob
|
|
9
|
+
*
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isBlob=e=>"Blob"===getType.getType(e);
|
|
8
12
|
|
|
9
13
|
exports["default"] = isBlob;
|
|
10
14
|
exports.isBlob = isBlob;
|
package/isBlob.esm.js
CHANGED
package/isBoolean.cjs.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var getType = require('./getType.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the payload is a boolean
|
|
9
|
+
*
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isBoolean=e=>"Boolean"===getType.getType(e);
|
|
8
12
|
|
|
9
13
|
exports["default"] = isBoolean;
|
|
10
14
|
exports.isBoolean = isBoolean;
|
package/isBoolean.esm.js
CHANGED
package/isBrowser.cjs.js
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @category ssr
|
|
7
|
+
* @category is
|
|
8
|
+
*/let isBrowser="undefined"!=typeof window;
|
|
6
9
|
|
|
7
10
|
exports["default"] = isBrowser;
|
|
8
11
|
exports.isBrowser = isBrowser;
|
package/isBrowser.esm.js
CHANGED
package/isBrowserNow.cjs.js
CHANGED
|
@@ -5,7 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var isUndefined = require('./isUndefined.cjs.js');
|
|
6
6
|
require('./getType.cjs.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @category ssr
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isBrowserNow=()=>!isUndefined.isUndefined(window);
|
|
9
12
|
|
|
10
13
|
exports["default"] = isBrowserNow;
|
|
11
14
|
exports.isBrowserNow = isBrowserNow;
|
package/isBrowserNow.esm.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { isUndefined } from './isUndefined.esm.js';
|
|
2
2
|
import './getType.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @category ssr
|
|
6
|
+
* @category is
|
|
7
|
+
*/let isBrowserNow=()=>!isUndefined(window);
|
|
5
8
|
|
|
6
9
|
export { isBrowserNow as default, isBrowserNow };
|
package/isDate.cjs.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var getType = require('./getType.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the payload is a Date, and that the date is valid
|
|
9
|
+
*
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isDate=t=>"Date"===getType.getType(t)&&!isNaN(t);
|
|
8
12
|
|
|
9
13
|
exports["default"] = isDate;
|
|
10
14
|
exports.isDate = isDate;
|
package/isDate.esm.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { getType } from './getType.esm.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Returns whether the payload is a Date, and that the date is valid
|
|
5
|
+
*
|
|
6
|
+
* @category is
|
|
7
|
+
*/let isDate=t=>"Date"===getType(t)&&!isNaN(t);
|
|
4
8
|
|
|
5
9
|
export { isDate as default, isDate };
|
package/isEmptyArray.cjs.js
CHANGED
|
@@ -5,7 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var isArray = require('./isArray.cjs.js');
|
|
6
6
|
require('./getType.cjs.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Returns whether the payload is a an empty array
|
|
10
|
+
*
|
|
11
|
+
* @category is
|
|
12
|
+
*/let isEmptyArray=t=>isArray.isArray(t)&&0===t.length;
|
|
9
13
|
|
|
10
14
|
exports["default"] = isEmptyArray;
|
|
11
15
|
exports.isEmptyArray = isEmptyArray;
|
package/isEmptyArray.esm.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { isArray } from './isArray.esm.js';
|
|
2
2
|
import './getType.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether the payload is a an empty array
|
|
6
|
+
*
|
|
7
|
+
* @category is
|
|
8
|
+
*/let isEmptyArray=t=>isArray(t)&&0===t.length;
|
|
5
9
|
|
|
6
10
|
export { isEmptyArray as default, isEmptyArray };
|
package/isEmptyObject.cjs.js
CHANGED
|
@@ -5,7 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var isPlainObject = require('./isPlainObject.cjs.js');
|
|
6
6
|
require('./getType.cjs.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
10
|
+
*
|
|
11
|
+
* @category is
|
|
12
|
+
*/let isEmptyObject=e=>isPlainObject.isPlainObject(e)&&0===Object.keys(e).length;
|
|
9
13
|
|
|
10
14
|
exports["default"] = isEmptyObject;
|
|
11
15
|
exports.isEmptyObject = isEmptyObject;
|
package/isEmptyObject.esm.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { isPlainObject } from './isPlainObject.esm.js';
|
|
2
2
|
import './getType.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
6
|
+
*
|
|
7
|
+
* @category is
|
|
8
|
+
*/let isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;
|
|
5
9
|
|
|
6
10
|
export { isEmptyObject as default, isEmptyObject };
|
package/isEmptyString.cjs.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the payload is ''
|
|
7
|
+
*
|
|
8
|
+
* @category is
|
|
9
|
+
*/let isEmptyString=t=>""===t;
|
|
6
10
|
|
|
7
11
|
exports["default"] = isEmptyString;
|
|
8
12
|
exports.isEmptyString = isEmptyString;
|
package/isEmptyString.esm.js
CHANGED
package/isError.cjs.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var getType = require('./getType.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the payload is an Error
|
|
9
|
+
*
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isError=o=>"Error"===getType.getType(o);
|
|
8
12
|
|
|
9
13
|
exports["default"] = isError;
|
|
10
14
|
exports.isError = isError;
|
package/isError.esm.js
CHANGED
package/isExternalUrl.cjs.js
CHANGED
|
@@ -4,7 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var isBrowser = require('./isBrowser.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Is external url compared to the given current URL (if not provided it falls
|
|
9
|
+
* back to `location.href`)
|
|
10
|
+
*
|
|
11
|
+
* @category location
|
|
12
|
+
*
|
|
13
|
+
*/let isExternalUrl=(r,t)=>{let l=/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i,o=l.exec(r);return(// if no matches are found it means we either have an invalid URL, a relative
|
|
14
|
+
// URL or a hash link, and those are not considered externals
|
|
15
|
+
!!o&&(!(t=t||isBrowser.isBrowser?location.href:"")||l.exec(t)?.[1]!==o[1]))};
|
|
8
16
|
|
|
9
17
|
exports["default"] = isExternalUrl;
|
|
10
18
|
exports.isExternalUrl = isExternalUrl;
|
package/isExternalUrl.esm.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { isBrowser } from './isBrowser.esm.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Is external url compared to the given current URL (if not provided it falls
|
|
5
|
+
* back to `location.href`)
|
|
6
|
+
*
|
|
7
|
+
* @category location
|
|
8
|
+
*
|
|
9
|
+
*/let isExternalUrl=(r,t)=>{let l=/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i,o=l.exec(r);return(// if no matches are found it means we either have an invalid URL, a relative
|
|
10
|
+
// URL or a hash link, and those are not considered externals
|
|
11
|
+
!!o&&(!(t=t||isBrowser?location.href:"")||l.exec(t)?.[1]!==o[1]))};
|
|
4
12
|
|
|
5
13
|
export { isExternalUrl as default, isExternalUrl };
|
package/isFile.cjs.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var getType = require('./getType.cjs.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the payload is a File
|
|
9
|
+
*
|
|
10
|
+
* @category is
|
|
11
|
+
*/let isFile=i=>"File"===getType.getType(i);
|
|
8
12
|
|
|
9
13
|
exports["default"] = isFile;
|
|
10
14
|
exports.isFile = isFile;
|
package/isFile.esm.js
CHANGED
package/isFloat.cjs.js
CHANGED
|
@@ -5,7 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var isNumber = require('./isNumber.cjs.js');
|
|
6
6
|
require('./getType.cjs.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Returns whether the payload is a float number
|
|
10
|
+
*
|
|
11
|
+
* @category is
|
|
12
|
+
*/let isFloat=o=>isNumber.isNumber(o)&&o%1!=0;
|
|
9
13
|
|
|
10
14
|
exports["default"] = isFloat;
|
|
11
15
|
exports.isFloat = isFloat;
|