@koine/utils 2.0.0-beta.2 → 2.0.0-beta.4
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 +23 -18
- package/Defer.mjs +6 -5
- package/Emitter.js +31 -20
- package/Emitter.mjs +13 -16
- package/README.md +5 -1
- package/accentSets.js +129 -37
- package/accentSets.mjs +113 -29
- package/addOrReplaceAtIdx.js +27 -10
- package/addOrReplaceAtIdx.mjs +9 -6
- package/areEqual.js +35 -41
- package/areEqual.mjs +16 -22
- package/arrayOfAll.js +20 -11
- package/arrayOfAll.mjs +1 -6
- package/arraySum.js +20 -9
- package/arraySum.mjs +1 -4
- package/arrayToLookup.js +21 -9
- package/arrayToLookup.mjs +2 -4
- package/buildUrlQueryString.js +32 -29
- package/buildUrlQueryString.mjs +11 -14
- package/capitalize.js +21 -9
- package/capitalize.mjs +3 -5
- package/changeUrlPath.js +23 -17
- package/changeUrlPath.mjs +2 -3
- package/chunkByChunks.js +35 -24
- package/chunkByChunks.mjs +17 -20
- package/chunkBySize.js +21 -8
- package/chunkBySize.mjs +3 -4
- package/clamp.js +19 -6
- package/clamp.mjs +1 -2
- package/clsx.js +29 -23
- package/clsx.mjs +11 -14
- package/convertRange.js +20 -7
- package/convertRange.mjs +2 -3
- package/cookie.js +13 -5
- package/cookie.mjs +3 -2
- package/createPalette.js +27 -19
- package/createPalette.mjs +9 -6
- package/debounce.js +27 -21
- package/debounce.mjs +9 -17
- package/debouncePromise.js +20 -11
- package/debouncePromise.mjs +1 -2
- package/debounceRaf.js +23 -14
- package/debounceRaf.mjs +5 -10
- package/decode.js +20 -7
- package/decode.mjs +2 -3
- package/encode.js +20 -7
- package/encode.mjs +2 -3
- package/ensureInt.js +20 -9
- package/ensureInt.mjs +1 -4
- package/env.js +1 -1
- package/env.mjs +0 -1
- package/errorToString.js +21 -14
- package/errorToString.mjs +1 -4
- package/findDuplicatedIndexes.js +22 -9
- package/findDuplicatedIndexes.mjs +4 -5
- package/forin.js +20 -7
- package/forin.mjs +2 -3
- package/gbToBytes.js +20 -7
- package/gbToBytes.mjs +1 -2
- package/getEmptyArray.js +25 -16
- package/getEmptyArray.mjs +4 -3
- package/getKeys.js +20 -6
- package/getKeys.mjs +1 -2
- package/getMediaQueryWidthResolvers.js +62 -53
- package/getMediaQueryWidthResolvers.mjs +44 -49
- package/getMediaQueryWidthTailwindScreens.js +36 -18
- package/getMediaQueryWidthTailwindScreens.mjs +18 -14
- package/getNonce.js +20 -10
- package/getNonce.mjs +1 -2
- package/getParamAmong.js +22 -19
- package/getParamAmong.mjs +2 -4
- package/getParamAsInt.js +22 -19
- package/getParamAsInt.mjs +2 -4
- package/getParamAsString.js +21 -16
- package/getParamAsString.mjs +1 -2
- package/getType.js +19 -12
- package/getType.mjs +2 -4
- package/getUrlHashParams.js +20 -13
- package/getUrlHashParams.mjs +2 -4
- package/getUrlHashPathname.js +20 -8
- package/getUrlHashPathname.mjs +1 -3
- package/getUrlPathnameParts.js +23 -23
- package/getUrlPathnameParts.mjs +2 -7
- package/getUrlQueryParams.js +26 -33
- package/getUrlQueryParams.mjs +7 -18
- package/imgEmptyPixel.js +20 -6
- package/imgEmptyPixel.mjs +1 -2
- package/index.js +531 -266
- package/index.mjs +2 -2
- package/invariant.js +24 -12
- package/invariant.mjs +6 -8
- package/isAnyObject.js +21 -12
- package/isAnyObject.mjs +1 -2
- package/isArray.js +21 -12
- package/isArray.mjs +1 -2
- package/isBlob.js +21 -12
- package/isBlob.mjs +1 -2
- package/isBoolean.js +21 -12
- package/isBoolean.mjs +1 -2
- package/isBrowser.js +20 -6
- package/isBrowser.mjs +1 -2
- package/isBrowserNow.js +21 -11
- package/isBrowserNow.mjs +1 -2
- package/isDate.js +21 -12
- package/isDate.mjs +1 -2
- package/isEmptyArray.js +21 -12
- package/isEmptyArray.mjs +1 -2
- package/isEmptyObject.js +21 -12
- package/isEmptyObject.mjs +1 -2
- package/isEmptyString.js +19 -6
- package/isEmptyString.mjs +1 -2
- package/isError.js +21 -12
- package/isError.mjs +1 -2
- package/isExternalUrl.js +24 -18
- package/isExternalUrl.mjs +4 -6
- package/isFile.js +21 -12
- package/isFile.mjs +1 -2
- package/isFloat.js +21 -12
- package/isFloat.mjs +1 -2
- package/isFormData.js +21 -12
- package/isFormData.mjs +1 -2
- package/isFullArray.js +21 -12
- package/isFullArray.mjs +1 -2
- package/isFullObject.js +21 -12
- package/isFullObject.mjs +1 -2
- package/isFullString.js +21 -12
- package/isFullString.mjs +1 -2
- package/isFunction.js +18 -9
- package/isFunction.mjs +1 -2
- package/isInt.js +21 -12
- package/isInt.mjs +1 -2
- package/isMap.js +21 -12
- package/isMap.mjs +1 -2
- package/isNaNValue.js +21 -12
- package/isNaNValue.mjs +1 -2
- package/isNegativeNumber.js +21 -12
- package/isNegativeNumber.mjs +1 -2
- package/isNull.js +21 -12
- package/isNull.mjs +1 -2
- package/isNullOrUndefined.js +23 -13
- package/isNullOrUndefined.mjs +1 -2
- package/isNumber.js +21 -14
- package/isNumber.mjs +1 -2
- package/isObject.js +21 -12
- package/isObject.mjs +1 -2
- package/isObjectLike.js +21 -14
- package/isObjectLike.mjs +1 -2
- package/isOneOf.js +19 -11
- package/isOneOf.mjs +1 -7
- package/isPlainObject.js +22 -15
- package/isPlainObject.mjs +3 -6
- package/isPositiveNumber.js +21 -12
- package/isPositiveNumber.mjs +1 -2
- package/isPrimitive.js +26 -22
- package/isPrimitive.mjs +5 -11
- package/isPromise.js +21 -12
- package/isPromise.mjs +1 -2
- package/isRegExp.js +21 -12
- package/isRegExp.mjs +1 -2
- package/isServer.js +22 -11
- package/isServer.mjs +1 -2
- package/isServerNow.js +21 -11
- package/isServerNow.mjs +1 -2
- package/isSet.js +21 -12
- package/isSet.mjs +1 -2
- package/isString.js +21 -12
- package/isString.mjs +1 -2
- package/isSymbol.js +21 -12
- package/isSymbol.mjs +1 -2
- package/isType.js +22 -17
- package/isType.mjs +3 -5
- package/isUndefined.js +21 -12
- package/isUndefined.mjs +1 -2
- package/isWeakMap.js +21 -12
- package/isWeakMap.mjs +1 -2
- package/isWeakSet.js +21 -12
- package/isWeakSet.mjs +1 -2
- package/kbToBytes.js +20 -7
- package/kbToBytes.mjs +1 -2
- package/location.js +6 -2
- package/location.mjs +3 -1
- package/lowercase.js +20 -9
- package/lowercase.mjs +1 -4
- package/mapListBy.js +21 -10
- package/mapListBy.mjs +2 -5
- package/matchSorter.js +132 -133
- package/matchSorter.mjs +108 -126
- package/mbToBytes.js +20 -7
- package/mbToBytes.mjs +1 -2
- package/mergeObjects.d.ts +1 -1
- package/mergeObjects.js +24 -26
- package/mergeObjects.mjs +12 -15
- package/mergeUrlQueryParams.js +25 -20
- package/mergeUrlQueryParams.mjs +4 -8
- package/moveSortableArrayItemByKey.js +26 -12
- package/moveSortableArrayItemByKey.mjs +8 -8
- package/noop.js +20 -7
- package/noop.mjs +1 -2
- package/normaliseUrl.js +22 -18
- package/normaliseUrl.mjs +1 -3
- package/normaliseUrlPathname.js +22 -17
- package/normaliseUrlPathname.mjs +1 -3
- package/objectOmit.js +21 -9
- package/objectOmit.mjs +3 -5
- package/objectPick.js +22 -9
- package/objectPick.mjs +4 -5
- package/package.json +11 -8
- package/parseCookie.js +29 -26
- package/parseCookie.mjs +11 -15
- package/parseURL.js +23 -10
- package/parseURL.mjs +5 -6
- package/quaranteneProps.js +24 -12
- package/quaranteneProps.mjs +6 -8
- package/randomInt.js +19 -6
- package/randomInt.mjs +1 -2
- package/randomKey.js +21 -8
- package/randomKey.mjs +3 -4
- package/readCookie.js +25 -12
- package/readCookie.mjs +7 -8
- package/removeAccents.js +24 -15
- package/removeAccents.mjs +5 -8
- package/removeCookie.js +26 -17
- package/removeCookie.mjs +6 -5
- package/removeDuplicates.js +1 -1
- package/removeDuplicates.mjs +0 -1
- package/removeDuplicatesByKey.js +24 -12
- package/removeDuplicatesByKey.mjs +5 -7
- package/removeDuplicatesComparing.js +22 -11
- package/removeDuplicatesComparing.mjs +3 -4
- package/removeIndexesFromArray.js +21 -8
- package/removeIndexesFromArray.mjs +3 -4
- package/removeTrailingSlash.js +20 -8
- package/removeTrailingSlash.mjs +1 -3
- package/removeUrlQueryParams.js +27 -20
- package/removeUrlQueryParams.mjs +5 -7
- package/render.js +61 -137
- package/render.mjs +43 -98
- package/roundTo.js +34 -22
- package/roundTo.mjs +15 -17
- package/serializeCookie.js +29 -35
- package/serializeCookie.mjs +9 -15
- package/setCookie.js +37 -31
- package/setCookie.mjs +13 -16
- package/shuffle.js +28 -14
- package/shuffle.mjs +10 -10
- package/slugify.js +33 -25
- package/slugify.mjs +13 -11
- package/split.js +18 -4
- package/swapMap.js +22 -10
- package/swapMap.mjs +3 -5
- package/throttle.d.ts +1 -0
- package/throttle.js +23 -15
- package/throttle.mjs +5 -11
- package/titleCase.js +20 -11
- package/titleCase.mjs +1 -6
- package/toNumber.js +20 -9
- package/toNumber.mjs +1 -2
- package/toRgba.js +22 -10
- package/toRgba.mjs +3 -5
- package/transformToUrlPathname.js +21 -18
- package/transformToUrlPathname.mjs +2 -5
- package/truncate.js +20 -13
- package/truncate.mjs +1 -8
- package/tryUntil.js +26 -15
- package/tryUntil.mjs +7 -10
- package/types.js +4 -1
- package/types.mjs +2 -1
- package/uid.js +21 -13
- package/uid.mjs +3 -5
- package/updateLinkParams.js +21 -14
- package/updateLinkParams.mjs +2 -3
- package/updateUrlQueryParams.js +26 -21
- package/updateUrlQueryParams.mjs +3 -7
- package/uppercase.js +20 -9
- package/uppercase.mjs +1 -4
- package/uuid.js +21 -10
- package/uuid.mjs +2 -5
- package/uuidNumeric.js +20 -7
- package/uuidNumeric.mjs +1 -2
- package/wait.js +20 -9
- package/wait.mjs +1 -4
- package/without.js +2 -3
- package/without.mjs +1 -3
package/isExternalUrl.js
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isExternalUrl: function() {
|
|
13
|
+
return isExternalUrl;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _isBrowser = /*#__PURE__*/ _interop_require_default._(require("./isBrowser"));
|
|
13
21
|
function isExternalUrl(url, currentUrl) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var urlMatches = reg.exec(url);
|
|
22
|
+
const reg = /https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i;
|
|
23
|
+
const urlMatches = reg.exec(url);
|
|
17
24
|
// if no matches are found it means we either have an invalid URL, a relative
|
|
18
25
|
// URL or a hash link, and those are not considered externals
|
|
19
26
|
if (!urlMatches) {
|
|
20
27
|
return false;
|
|
21
28
|
}
|
|
22
|
-
currentUrl = currentUrl ||
|
|
23
|
-
return currentUrl ?
|
|
29
|
+
currentUrl = currentUrl || _isBrowser.default ? location.href : "";
|
|
30
|
+
return currentUrl ? reg.exec(currentUrl)?.[1] !== urlMatches[1] : true;
|
|
24
31
|
}
|
|
25
|
-
|
|
26
|
-
exports.default = isExternalUrl;
|
|
32
|
+
const _default = isExternalUrl;
|
package/isExternalUrl.mjs
CHANGED
|
@@ -5,17 +5,15 @@ import isBrowser from "./isBrowser";
|
|
|
5
5
|
*
|
|
6
6
|
* @category location
|
|
7
7
|
*
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var reg = /https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i;
|
|
12
|
-
var urlMatches = reg.exec(url);
|
|
8
|
+
*/ export function isExternalUrl(url, currentUrl) {
|
|
9
|
+
const reg = /https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i;
|
|
10
|
+
const urlMatches = reg.exec(url);
|
|
13
11
|
// if no matches are found it means we either have an invalid URL, a relative
|
|
14
12
|
// URL or a hash link, and those are not considered externals
|
|
15
13
|
if (!urlMatches) {
|
|
16
14
|
return false;
|
|
17
15
|
}
|
|
18
16
|
currentUrl = currentUrl || isBrowser ? location.href : "";
|
|
19
|
-
return currentUrl ?
|
|
17
|
+
return currentUrl ? reg.exec(currentUrl)?.[1] !== urlMatches[1] : true;
|
|
20
18
|
}
|
|
21
19
|
export default isExternalUrl;
|
package/isFile.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isFile: function() {
|
|
13
|
+
return isFile;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
|
|
11
21
|
function isFile(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _getType.default)(payload) === "File";
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isFile;
|
|
24
|
+
const _default = isFile;
|
package/isFile.mjs
CHANGED
package/isFloat.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isFloat: function() {
|
|
13
|
+
return isFloat;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _isNumber = /*#__PURE__*/ _interop_require_default._(require("./isNumber"));
|
|
11
21
|
function isFloat(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _isNumber.default)(payload) && payload % 1 !== 0;
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isFloat;
|
|
24
|
+
const _default = isFloat;
|
package/isFloat.mjs
CHANGED
|
@@ -3,8 +3,7 @@ import isNumber from "./isNumber";
|
|
|
3
3
|
* Returns whether the payload is a float number
|
|
4
4
|
*
|
|
5
5
|
* @category is
|
|
6
|
-
*/
|
|
7
|
-
export function isFloat(payload) {
|
|
6
|
+
*/ export function isFloat(payload) {
|
|
8
7
|
return isNumber(payload) && payload % 1 !== 0;
|
|
9
8
|
}
|
|
10
9
|
export default isFloat;
|
package/isFormData.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isFormData: function() {
|
|
13
|
+
return isFormData;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
|
|
11
21
|
function isFormData(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _getType.default)(payload) === "FormData";
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isFormData;
|
|
24
|
+
const _default = isFormData;
|
package/isFormData.mjs
CHANGED
package/isFullArray.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isFullArray: function() {
|
|
13
|
+
return isFullArray;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _isArray = /*#__PURE__*/ _interop_require_default._(require("./isArray"));
|
|
11
21
|
function isFullArray(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _isArray.default)(payload) && payload.length > 0;
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isFullArray;
|
|
24
|
+
const _default = isFullArray;
|
package/isFullArray.mjs
CHANGED
|
@@ -3,8 +3,7 @@ import isArray from "./isArray";
|
|
|
3
3
|
* Returns whether the payload is a an array with at least 1 item
|
|
4
4
|
*
|
|
5
5
|
* @category is
|
|
6
|
-
*/
|
|
7
|
-
export function isFullArray(payload) {
|
|
6
|
+
*/ export function isFullArray(payload) {
|
|
8
7
|
return isArray(payload) && payload.length > 0;
|
|
9
8
|
}
|
|
10
9
|
export default isFullArray;
|
package/isFullObject.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isFullObject: function() {
|
|
13
|
+
return isFullObject;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _isPlainObject = /*#__PURE__*/ _interop_require_default._(require("./isPlainObject"));
|
|
11
21
|
function isFullObject(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _isPlainObject.default)(payload) && Object.keys(payload).length > 0;
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isFullObject;
|
|
24
|
+
const _default = isFullObject;
|
package/isFullObject.mjs
CHANGED
|
@@ -3,8 +3,7 @@ import isPlainObject from "./isPlainObject";
|
|
|
3
3
|
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
4
4
|
*
|
|
5
5
|
* @category is
|
|
6
|
-
*/
|
|
7
|
-
export function isFullObject(payload) {
|
|
6
|
+
*/ export function isFullObject(payload) {
|
|
8
7
|
return isPlainObject(payload) && Object.keys(payload).length > 0;
|
|
9
8
|
}
|
|
10
9
|
export default isFullObject;
|
package/isFullString.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isFullString: function() {
|
|
13
|
+
return isFullString;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _isString = /*#__PURE__*/ _interop_require_default._(require("./isString"));
|
|
11
21
|
function isFullString(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _isString.default)(payload) && payload !== "";
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isFullString;
|
|
24
|
+
const _default = isFullString;
|
package/isFullString.mjs
CHANGED
|
@@ -3,8 +3,7 @@ import isString from "./isString";
|
|
|
3
3
|
* Returns whether the payload is a string, BUT returns false for ''
|
|
4
4
|
*
|
|
5
5
|
* @category is
|
|
6
|
-
*/
|
|
7
|
-
export function isFullString(payload) {
|
|
6
|
+
*/ export function isFullString(payload) {
|
|
8
7
|
return isString(payload) && payload !== "";
|
|
9
8
|
}
|
|
10
9
|
export default isFullString;
|
package/isFunction.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isFunction: function() {
|
|
13
|
+
return isFunction;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
9
19
|
function isFunction(payload) {
|
|
10
20
|
return typeof payload === "function";
|
|
11
21
|
}
|
|
12
|
-
|
|
13
|
-
exports.default = isFunction;
|
|
22
|
+
const _default = isFunction;
|
package/isFunction.mjs
CHANGED
package/isInt.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isInt: function() {
|
|
13
|
+
return isInt;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _isNumber = /*#__PURE__*/ _interop_require_default._(require("./isNumber"));
|
|
11
21
|
function isInt(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _isNumber.default)(payload) && payload % 1 === 0;
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isInt;
|
|
24
|
+
const _default = isInt;
|
package/isInt.mjs
CHANGED
package/isMap.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isMap: function() {
|
|
13
|
+
return isMap;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
|
|
11
21
|
function isMap(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _getType.default)(payload) === "Map";
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isMap;
|
|
24
|
+
const _default = isMap;
|
package/isMap.mjs
CHANGED
package/isNaNValue.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isNaNValue: function() {
|
|
13
|
+
return isNaNValue;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
|
|
11
21
|
function isNaNValue(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _getType.default)(payload) === "Number" && isNaN(payload);
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isNaNValue;
|
|
24
|
+
const _default = isNaNValue;
|
package/isNaNValue.mjs
CHANGED
|
@@ -3,8 +3,7 @@ import getType from "./getType";
|
|
|
3
3
|
* Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
|
|
4
4
|
*
|
|
5
5
|
* @category is
|
|
6
|
-
*/
|
|
7
|
-
export function isNaNValue(payload) {
|
|
6
|
+
*/ export function isNaNValue(payload) {
|
|
8
7
|
return getType(payload) === "Number" && isNaN(payload);
|
|
9
8
|
}
|
|
10
9
|
export default isNaNValue;
|
package/isNegativeNumber.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isNegativeNumber: function() {
|
|
13
|
+
return isNegativeNumber;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _isNumber = /*#__PURE__*/ _interop_require_default._(require("./isNumber"));
|
|
11
21
|
function isNegativeNumber(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _isNumber.default)(payload) && payload < 0;
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isNegativeNumber;
|
|
24
|
+
const _default = isNegativeNumber;
|
package/isNegativeNumber.mjs
CHANGED
|
@@ -3,8 +3,7 @@ import isNumber from "./isNumber";
|
|
|
3
3
|
* Returns whether the payload is a negative number (but not 0)
|
|
4
4
|
*
|
|
5
5
|
* @category is
|
|
6
|
-
*/
|
|
7
|
-
export function isNegativeNumber(payload) {
|
|
6
|
+
*/ export function isNegativeNumber(payload) {
|
|
8
7
|
return isNumber(payload) && payload < 0;
|
|
9
8
|
}
|
|
10
9
|
export default isNegativeNumber;
|
package/isNull.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isNull: function() {
|
|
13
|
+
return isNull;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _getType = /*#__PURE__*/ _interop_require_default._(require("./getType"));
|
|
11
21
|
function isNull(payload) {
|
|
12
|
-
return (0,
|
|
22
|
+
return (0, _getType.default)(payload) === "Null";
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
exports.default = isNull;
|
|
24
|
+
const _default = isNull;
|
package/isNull.mjs
CHANGED