@koine/utils 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Defer.js +6 -2
- package/{node/Defer.js → Defer.mjs} +2 -6
- package/Emitter.js +6 -2
- package/{node/Emitter.js → Emitter.mjs} +2 -6
- package/accentSets.js +5 -2
- package/{node/accentSets.js → accentSets.mjs} +2 -5
- package/addOrReplaceAtIdx.js +8 -4
- package/addOrReplaceAtIdx.mjs +19 -0
- package/areEqual.js +10 -6
- package/{node/areEqual.js → areEqual.mjs} +6 -10
- package/arrayOfAll.js +6 -2
- package/{node/arrayOfAll.js → arrayOfAll.mjs} +2 -6
- package/arraySum.js +6 -2
- package/arraySum.mjs +9 -0
- package/arrayToLookup.js +6 -2
- package/{node/arrayToLookup.js → arrayToLookup.mjs} +2 -6
- package/buildUrlQueryString.js +12 -7
- package/{node/buildUrlQueryString.js → buildUrlQueryString.mjs} +7 -12
- package/capitalize.js +6 -2
- package/{node/capitalize.js → capitalize.mjs} +2 -6
- package/changeUrlPath.js +11 -6
- package/changeUrlPath.mjs +18 -0
- package/chunkByChunks.js +6 -2
- package/{node/chunkByChunks.js → chunkByChunks.mjs} +2 -6
- package/chunkBySize.js +6 -2
- package/{node/chunkBySize.js → chunkBySize.mjs} +2 -6
- package/clamp.js +6 -2
- package/{node/clamp.js → clamp.mjs} +2 -6
- package/clsx.js +6 -2
- package/{node/clsx.js → clsx.mjs} +2 -6
- package/convertRange.js +6 -2
- package/{node/convertRange.js → convertRange.mjs} +2 -6
- package/cookie.js +4 -1
- package/{node/cookie.js → cookie.mjs} +1 -4
- package/debounce.js +6 -2
- package/{node/debounce.js → debounce.mjs} +2 -6
- package/debouncePromise.js +6 -3
- package/debouncePromise.mjs +9 -0
- package/debounceRaf.js +6 -2
- package/{node/debounceRaf.js → debounceRaf.mjs} +2 -6
- package/decode.js +6 -2
- package/{node/decode.js → decode.mjs} +2 -6
- package/encode.js +6 -2
- package/{node/encode.js → encode.mjs} +2 -6
- package/ensureInt.js +6 -2
- package/ensureInt.mjs +9 -0
- package/{node/env.js → env.mjs} +0 -0
- package/findDuplicatedIndexes.js +6 -2
- package/{node/findDuplicatedIndexes.js → findDuplicatedIndexes.mjs} +2 -6
- package/forin.js +6 -2
- package/forin.mjs +11 -0
- package/gbToBytes.js +6 -2
- package/gbToBytes.mjs +7 -0
- package/getEmptyArray.js +9 -4
- package/getEmptyArray.mjs +15 -0
- package/getKeys.js +5 -2
- package/{node/getKeys.js → getKeys.mjs} +2 -5
- package/getMediaQueryWidthResolvers.js +8 -4
- package/{node/getMediaQueryWidthResolvers.js → getMediaQueryWidthResolvers.mjs} +4 -8
- package/getMediaQueryWidthTailwindScreens.js +8 -4
- package/{node/getMediaQueryWidthTailwindScreens.js → getMediaQueryWidthTailwindScreens.mjs} +4 -8
- package/getNonce.js +8 -4
- package/getNonce.mjs +9 -0
- package/getParamAmong.js +9 -4
- package/{node/getParamAmong.js → getParamAmong.mjs} +4 -9
- package/getParamAsInt.js +9 -4
- package/{node/getParamAsInt.js → getParamAsInt.mjs} +4 -9
- package/getParamAsString.js +9 -4
- package/getParamAsString.mjs +14 -0
- package/getType.js +6 -2
- package/{node/getType.js → getType.mjs} +2 -6
- package/getUrlHashParams.js +6 -2
- package/{node/getUrlHashParams.js → getUrlHashParams.mjs} +2 -6
- package/getUrlHashPathname.js +6 -2
- package/{node/getUrlHashPathname.js → getUrlHashPathname.mjs} +2 -6
- package/getUrlPathnameParts.js +9 -4
- package/{node/getUrlPathnameParts.js → getUrlPathnameParts.mjs} +4 -9
- package/getUrlQueryParams.js +9 -4
- package/{node/getUrlQueryParams.js → getUrlQueryParams.mjs} +4 -9
- package/imgEmptyPixel.js +5 -2
- package/imgEmptyPixel.mjs +7 -0
- package/index.js +132 -129
- package/index.mjs +131 -0
- package/invariant.js +6 -2
- package/{node/invariant.js → invariant.mjs} +2 -6
- package/isAnyObject.js +9 -4
- package/isAnyObject.mjs +10 -0
- package/isArray.js +9 -4
- package/isArray.mjs +10 -0
- package/isBlob.js +9 -4
- package/isBlob.mjs +10 -0
- package/isBoolean.js +9 -4
- package/isBoolean.mjs +10 -0
- package/isBrowser.js +5 -2
- package/isBrowser.mjs +8 -0
- package/isDate.js +9 -4
- package/isDate.mjs +10 -0
- package/isEmptyArray.js +9 -4
- package/isEmptyArray.mjs +10 -0
- package/isEmptyObject.js +9 -4
- package/isEmptyObject.mjs +10 -0
- package/isEmptyString.js +6 -2
- package/isEmptyString.mjs +9 -0
- package/isError.js +9 -4
- package/isError.mjs +10 -0
- package/isExternalUrl.js +9 -4
- package/{node/isExternalUrl.js → isExternalUrl.mjs} +4 -9
- package/isFile.js +9 -4
- package/isFile.mjs +10 -0
- package/isFloat.js +9 -4
- package/isFloat.mjs +10 -0
- package/isFormData.js +9 -4
- package/isFormData.mjs +10 -0
- package/isFullArray.js +9 -4
- package/isFullArray.mjs +10 -0
- package/isFullObject.js +9 -4
- package/isFullObject.mjs +10 -0
- package/isFullString.js +9 -4
- package/isFullString.mjs +10 -0
- package/isFunction.js +6 -2
- package/isFunction.mjs +9 -0
- package/isInt.js +9 -4
- package/isInt.mjs +10 -0
- package/isMap.js +9 -4
- package/isMap.mjs +10 -0
- package/isNaNValue.js +9 -4
- package/isNaNValue.mjs +10 -0
- package/isNegativeNumber.js +9 -4
- package/isNegativeNumber.mjs +10 -0
- package/isNull.js +9 -4
- package/isNull.mjs +10 -0
- package/isNullOrUndefined.js +9 -5
- package/isNullOrUndefined.mjs +10 -0
- package/isNumber.js +9 -4
- package/isNumber.mjs +12 -0
- package/isObject.js +9 -4
- package/isObject.mjs +10 -0
- package/isObjectLike.js +9 -4
- package/isObjectLike.mjs +12 -0
- package/isOneOf.js +6 -2
- package/isOneOf.mjs +10 -0
- package/isPlainObject.js +9 -4
- package/isPlainObject.mjs +13 -0
- package/isPositiveNumber.js +9 -4
- package/isPositiveNumber.mjs +10 -0
- package/isPrimitive.js +19 -14
- package/isPrimitive.mjs +20 -0
- package/isPromise.js +9 -4
- package/isPromise.mjs +10 -0
- package/isRegExp.js +9 -4
- package/isRegExp.mjs +10 -0
- package/isServer.js +7 -3
- package/isServer.mjs +9 -0
- package/isSet.js +9 -4
- package/isSet.mjs +10 -0
- package/isString.js +9 -4
- package/isString.mjs +10 -0
- package/isSymbol.js +9 -4
- package/isSymbol.mjs +10 -0
- package/isType.js +9 -4
- package/{node/isType.js → isType.mjs} +4 -9
- package/isUndefined.js +9 -4
- package/isUndefined.mjs +10 -0
- package/isWeakMap.js +9 -4
- package/isWeakMap.mjs +10 -0
- package/isWeakSet.js +9 -4
- package/isWeakSet.mjs +10 -0
- package/kbToBytes.js +6 -2
- package/kbToBytes.mjs +7 -0
- package/location.js +2 -1
- package/location.mjs +1 -0
- package/lowercase.js +6 -2
- package/lowercase.mjs +9 -0
- package/mapListBy.js +6 -2
- package/{node/mapListBy.js → mapListBy.mjs} +2 -6
- package/matchSorter.js +11 -7
- package/{node/matchSorter.js → matchSorter.mjs} +7 -11
- package/mbToBytes.js +6 -2
- package/mbToBytes.mjs +7 -0
- package/mergeObjects.js +11 -7
- package/{node/mergeObjects.js → mergeObjects.mjs} +7 -11
- package/mergeUrlQueryParams.js +9 -4
- package/{node/mergeUrlQueryParams.js → mergeUrlQueryParams.mjs} +4 -9
- package/moveSortableArrayItemByKey.js +8 -4
- package/{node/moveSortableArrayItemByKey.js → moveSortableArrayItemByKey.mjs} +4 -8
- package/noop.js +6 -2
- package/noop.mjs +7 -0
- package/normaliseUrl.js +9 -4
- package/normaliseUrl.mjs +15 -0
- package/normaliseUrlPathname.js +9 -4
- package/normaliseUrlPathname.mjs +14 -0
- package/objectOmit.js +6 -2
- package/{node/objectOmit.js → objectOmit.mjs} +2 -6
- package/objectPick.js +6 -2
- package/{node/objectPick.js → objectPick.mjs} +2 -6
- package/package.json +10 -8
- package/parseCookie.js +6 -2
- package/{node/parseCookie.js → parseCookie.mjs} +2 -6
- package/parseURL.js +6 -2
- package/{node/parseURL.js → parseURL.mjs} +2 -6
- package/quaranteneProps.js +6 -2
- package/{node/quaranteneProps.js → quaranteneProps.mjs} +2 -6
- package/randomInt.js +6 -2
- package/randomInt.mjs +9 -0
- package/randomKey.js +6 -2
- package/{node/randomKey.js → randomKey.mjs} +2 -6
- package/readCookie.js +6 -2
- package/{node/readCookie.js → readCookie.mjs} +2 -6
- package/removeAccents.js +8 -4
- package/removeAccents.mjs +15 -0
- package/removeCookie.js +10 -6
- package/removeCookie.mjs +15 -0
- package/{node/removeDuplicates.js → removeDuplicates.mjs} +0 -0
- package/removeDuplicatesByKey.js +6 -2
- package/{node/removeDuplicatesByKey.js → removeDuplicatesByKey.mjs} +2 -6
- package/removeDuplicatesComparing.js +10 -6
- package/removeDuplicatesComparing.mjs +10 -0
- package/removeIndexesFromArray.js +6 -2
- package/removeIndexesFromArray.mjs +14 -0
- package/removeTrailingSlash.js +6 -2
- package/removeTrailingSlash.mjs +10 -0
- package/removeUrlQueryParams.js +11 -6
- package/removeUrlQueryParams.mjs +21 -0
- package/roundTo.js +6 -2
- package/{node/roundTo.js → roundTo.mjs} +2 -6
- package/serializeCookie.js +8 -4
- package/{node/serializeCookie.js → serializeCookie.mjs} +4 -8
- package/setCookie.js +14 -10
- package/{node/setCookie.js → setCookie.mjs} +10 -14
- package/shuffle.js +8 -4
- package/{node/shuffle.js → shuffle.mjs} +4 -8
- package/slugify.js +9 -5
- package/{node/slugify.js → slugify.mjs} +5 -9
- package/swapMap.js +6 -2
- package/{node/swapMap.js → swapMap.mjs} +2 -6
- package/throttle.js +8 -4
- package/{node/throttle.js → throttle.mjs} +4 -8
- package/titleCase.js +6 -2
- package/{node/titleCase.js → titleCase.mjs} +2 -6
- package/toNumber.js +8 -4
- package/toNumber.mjs +8 -0
- package/toRgba.js +6 -2
- package/{node/toRgba.js → toRgba.mjs} +2 -6
- package/transformToUrlPathname.js +9 -4
- package/transformToUrlPathname.mjs +16 -0
- package/truncate.js +6 -2
- package/truncate.mjs +13 -0
- package/tryUntil.js +6 -2
- package/{node/tryUntil.js → tryUntil.mjs} +2 -6
- package/types.js +2 -1
- package/types.mjs +1 -0
- package/uid.js +6 -2
- package/{node/uid.js → uid.mjs} +2 -6
- package/updateLinkParams.js +9 -4
- package/updateLinkParams.mjs +14 -0
- package/updateUrlQueryParams.js +12 -7
- package/updateUrlQueryParams.mjs +18 -0
- package/uppercase.js +6 -2
- package/uppercase.mjs +9 -0
- package/uuid.js +6 -2
- package/{node/uuid.js → uuid.mjs} +2 -6
- package/uuidNumeric.js +6 -2
- package/uuidNumeric.mjs +6 -0
- package/wait.js +6 -2
- package/wait.mjs +9 -0
- package/node/addOrReplaceAtIdx.js +0 -23
- package/node/arraySum.js +0 -13
- package/node/changeUrlPath.js +0 -23
- package/node/debouncePromise.js +0 -12
- package/node/ensureInt.js +0 -13
- package/node/forin.js +0 -15
- package/node/gbToBytes.js +0 -11
- package/node/getEmptyArray.js +0 -20
- package/node/getNonce.js +0 -13
- package/node/getParamAsString.js +0 -19
- package/node/imgEmptyPixel.js +0 -10
- package/node/index.js +0 -134
- package/node/isAnyObject.js +0 -15
- package/node/isArray.js +0 -15
- package/node/isBlob.js +0 -15
- package/node/isBoolean.js +0 -15
- package/node/isBrowser.js +0 -11
- package/node/isDate.js +0 -15
- package/node/isEmptyArray.js +0 -15
- package/node/isEmptyObject.js +0 -15
- package/node/isEmptyString.js +0 -13
- package/node/isError.js +0 -15
- package/node/isFile.js +0 -15
- package/node/isFloat.js +0 -15
- package/node/isFormData.js +0 -15
- package/node/isFullArray.js +0 -15
- package/node/isFullObject.js +0 -15
- package/node/isFullString.js +0 -15
- package/node/isFunction.js +0 -13
- package/node/isInt.js +0 -15
- package/node/isMap.js +0 -15
- package/node/isNaNValue.js +0 -15
- package/node/isNegativeNumber.js +0 -15
- package/node/isNull.js +0 -15
- package/node/isNullOrUndefined.js +0 -14
- package/node/isNumber.js +0 -17
- package/node/isObject.js +0 -15
- package/node/isObjectLike.js +0 -17
- package/node/isOneOf.js +0 -14
- package/node/isPlainObject.js +0 -18
- package/node/isPositiveNumber.js +0 -15
- package/node/isPrimitive.js +0 -25
- package/node/isPromise.js +0 -15
- package/node/isRegExp.js +0 -15
- package/node/isServer.js +0 -13
- package/node/isSet.js +0 -15
- package/node/isString.js +0 -15
- package/node/isSymbol.js +0 -15
- package/node/isUndefined.js +0 -15
- package/node/isWeakMap.js +0 -15
- package/node/isWeakSet.js +0 -15
- package/node/kbToBytes.js +0 -11
- package/node/location.js +0 -2
- package/node/lowercase.js +0 -13
- package/node/mbToBytes.js +0 -11
- package/node/noop.js +0 -11
- package/node/normaliseUrl.js +0 -20
- package/node/normaliseUrlPathname.js +0 -19
- package/node/randomInt.js +0 -13
- package/node/removeAccents.js +0 -19
- package/node/removeCookie.js +0 -19
- package/node/removeDuplicatesComparing.js +0 -14
- package/node/removeIndexesFromArray.js +0 -18
- package/node/removeTrailingSlash.js +0 -14
- package/node/removeUrlQueryParams.js +0 -26
- package/node/toNumber.js +0 -12
- package/node/transformToUrlPathname.js +0 -21
- package/node/truncate.js +0 -17
- package/node/types.js +0 -2
- package/node/updateLinkParams.js +0 -19
- package/node/updateUrlQueryParams.js +0 -23
- package/node/uppercase.js +0 -13
- package/node/uuidNumeric.js +0 -10
- package/node/wait.js +0 -13
package/node/isFullArray.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFullArray = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isArray_1 = tslib_1.__importDefault(require("./isArray"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a an array with at least 1 item
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isFullArray(payload) {
|
|
12
|
-
return (0, isArray_1.default)(payload) && payload.length > 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isFullArray = isFullArray;
|
|
15
|
-
exports.default = isFullArray;
|
package/node/isFullObject.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFullObject = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isPlainObject_1 = tslib_1.__importDefault(require("./isPlainObject"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isFullObject(payload) {
|
|
12
|
-
return (0, isPlainObject_1.default)(payload) && Object.keys(payload).length > 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isFullObject = isFullObject;
|
|
15
|
-
exports.default = isFullObject;
|
package/node/isFullString.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFullString = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isString_1 = tslib_1.__importDefault(require("./isString"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a string, BUT returns false for ''
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isFullString(payload) {
|
|
12
|
-
return (0, isString_1.default)(payload) && payload !== "";
|
|
13
|
-
}
|
|
14
|
-
exports.isFullString = isFullString;
|
|
15
|
-
exports.default = isFullString;
|
package/node/isFunction.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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/isInt.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isInt = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isNumber_1 = tslib_1.__importDefault(require("./isNumber"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is an integer number
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isInt(payload) {
|
|
12
|
-
return (0, isNumber_1.default)(payload) && payload % 1 === 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isInt = isInt;
|
|
15
|
-
exports.default = isInt;
|
package/node/isMap.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMap = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a Map
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isMap(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Map";
|
|
13
|
-
}
|
|
14
|
-
exports.isMap = isMap;
|
|
15
|
-
exports.default = isMap;
|
package/node/isNaNValue.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNaNValue = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isNaNValue(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Number" && isNaN(payload);
|
|
13
|
-
}
|
|
14
|
-
exports.isNaNValue = isNaNValue;
|
|
15
|
-
exports.default = isNaNValue;
|
package/node/isNegativeNumber.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNegativeNumber = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isNumber_1 = tslib_1.__importDefault(require("./isNumber"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a negative number (but not 0)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isNegativeNumber(payload) {
|
|
12
|
-
return (0, isNumber_1.default)(payload) && payload < 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isNegativeNumber = isNegativeNumber;
|
|
15
|
-
exports.default = isNegativeNumber;
|
package/node/isNull.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNull = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is null
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isNull(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Null";
|
|
13
|
-
}
|
|
14
|
-
exports.isNull = isNull;
|
|
15
|
-
exports.default = isNull;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNullOrUndefined = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isNull_1 = tslib_1.__importDefault(require("./isNull"));
|
|
6
|
-
var isOneOf_1 = tslib_1.__importDefault(require("./isOneOf"));
|
|
7
|
-
var isUndefined_1 = tslib_1.__importDefault(require("./isUndefined"));
|
|
8
|
-
/**
|
|
9
|
-
* Returns true whether the payload is null or undefined
|
|
10
|
-
*
|
|
11
|
-
* @category is
|
|
12
|
-
*/
|
|
13
|
-
exports.isNullOrUndefined = (0, isOneOf_1.default)(isNull_1.default, isUndefined_1.default);
|
|
14
|
-
exports.default = exports.isNullOrUndefined;
|
package/node/isNumber.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNumber = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a number (but not NaN)
|
|
8
|
-
*
|
|
9
|
-
* This will return `false` for `NaN`!!
|
|
10
|
-
*
|
|
11
|
-
* @category is
|
|
12
|
-
*/
|
|
13
|
-
function isNumber(payload) {
|
|
14
|
-
return (0, getType_1.default)(payload) === "Number" && !isNaN(payload);
|
|
15
|
-
}
|
|
16
|
-
exports.isNumber = isNumber;
|
|
17
|
-
exports.default = isNumber;
|
package/node/isObject.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isObject = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isPlainObject_1 = tslib_1.__importDefault(require("./isPlainObject"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isObject(payload) {
|
|
12
|
-
return (0, isPlainObject_1.default)(payload);
|
|
13
|
-
}
|
|
14
|
-
exports.isObject = isObject;
|
|
15
|
-
exports.default = isObject;
|
package/node/isObjectLike.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isObjectLike = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isAnyObject_1 = tslib_1.__importDefault(require("./isAnyObject"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is an object like a type passed in < >
|
|
8
|
-
*
|
|
9
|
-
* Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
|
|
10
|
-
*
|
|
11
|
-
* @category is
|
|
12
|
-
*/
|
|
13
|
-
function isObjectLike(payload) {
|
|
14
|
-
return (0, isAnyObject_1.default)(payload);
|
|
15
|
-
}
|
|
16
|
-
exports.isObjectLike = isObjectLike;
|
|
17
|
-
exports.default = isObjectLike;
|
package/node/isOneOf.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isOneOf = void 0;
|
|
4
|
-
function isOneOf(a, b, c, d, e) {
|
|
5
|
-
return function (value) {
|
|
6
|
-
return a(value) ||
|
|
7
|
-
b(value) ||
|
|
8
|
-
(!!c && c(value)) ||
|
|
9
|
-
(!!d && d(value)) ||
|
|
10
|
-
(!!e && e(value));
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
exports.isOneOf = isOneOf;
|
|
14
|
-
exports.default = isOneOf;
|
package/node/isPlainObject.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPlainObject = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isPlainObject(payload) {
|
|
12
|
-
if ((0, getType_1.default)(payload) !== "Object")
|
|
13
|
-
return false;
|
|
14
|
-
return (payload.constructor === Object &&
|
|
15
|
-
Object.getPrototypeOf(payload) === Object.prototype);
|
|
16
|
-
}
|
|
17
|
-
exports.isPlainObject = isPlainObject;
|
|
18
|
-
exports.default = isPlainObject;
|
package/node/isPositiveNumber.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPositiveNumber = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isNumber_1 = tslib_1.__importDefault(require("./isNumber"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a positive number (but not 0)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isPositiveNumber(payload) {
|
|
12
|
-
return (0, isNumber_1.default)(payload) && payload > 0;
|
|
13
|
-
}
|
|
14
|
-
exports.isPositiveNumber = isPositiveNumber;
|
|
15
|
-
exports.default = isPositiveNumber;
|
package/node/isPrimitive.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPrimitive = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isString_1 = tslib_1.__importDefault(require("./isString"));
|
|
6
|
-
var isNull_1 = tslib_1.__importDefault(require("./isNull"));
|
|
7
|
-
var isNumber_1 = tslib_1.__importDefault(require("./isNumber"));
|
|
8
|
-
var isUndefined_1 = tslib_1.__importDefault(require("./isUndefined"));
|
|
9
|
-
var isBoolean_1 = tslib_1.__importDefault(require("./isBoolean"));
|
|
10
|
-
var isSymbol_1 = tslib_1.__importDefault(require("./isSymbol"));
|
|
11
|
-
/**
|
|
12
|
-
* Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
|
|
13
|
-
*
|
|
14
|
-
* @category is
|
|
15
|
-
*/
|
|
16
|
-
function isPrimitive(payload) {
|
|
17
|
-
return ((0, isBoolean_1.default)(payload) ||
|
|
18
|
-
(0, isNull_1.default)(payload) ||
|
|
19
|
-
(0, isUndefined_1.default)(payload) ||
|
|
20
|
-
(0, isNumber_1.default)(payload) ||
|
|
21
|
-
(0, isString_1.default)(payload) ||
|
|
22
|
-
(0, isSymbol_1.default)(payload));
|
|
23
|
-
}
|
|
24
|
-
exports.isPrimitive = isPrimitive;
|
|
25
|
-
exports.default = isPrimitive;
|
package/node/isPromise.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPromise = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a Promise
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isPromise(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Promise";
|
|
13
|
-
}
|
|
14
|
-
exports.isPromise = isPromise;
|
|
15
|
-
exports.default = isPromise;
|
package/node/isRegExp.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRegExp = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a regular expression (RegExp)
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isRegExp(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "RegExp";
|
|
13
|
-
}
|
|
14
|
-
exports.isRegExp = isRegExp;
|
|
15
|
-
exports.default = isRegExp;
|
package/node/isServer.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isServer = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var isBrowser_1 = tslib_1.__importDefault(require("./isBrowser"));
|
|
6
|
-
/**
|
|
7
|
-
* @category ssr
|
|
8
|
-
* @category is
|
|
9
|
-
*/
|
|
10
|
-
exports.isServer = !isBrowser_1.default;
|
|
11
|
-
// export const isServer = typeof window === "undefined";
|
|
12
|
-
// export const isServer = () => typeof window === "undefined";
|
|
13
|
-
exports.default = exports.isServer;
|
package/node/isSet.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSet = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a Set
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isSet(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Set";
|
|
13
|
-
}
|
|
14
|
-
exports.isSet = isSet;
|
|
15
|
-
exports.default = isSet;
|
package/node/isString.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isString = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a string
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isString(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "String";
|
|
13
|
-
}
|
|
14
|
-
exports.isString = isString;
|
|
15
|
-
exports.default = isString;
|
package/node/isSymbol.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSymbol = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a Symbol
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isSymbol(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Symbol";
|
|
13
|
-
}
|
|
14
|
-
exports.isSymbol = isSymbol;
|
|
15
|
-
exports.default = isSymbol;
|
package/node/isUndefined.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isUndefined = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is undefined
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isUndefined(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "Undefined";
|
|
13
|
-
}
|
|
14
|
-
exports.isUndefined = isUndefined;
|
|
15
|
-
exports.default = isUndefined;
|
package/node/isWeakMap.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isWeakMap = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a WeakMap
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isWeakMap(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "WeakMap";
|
|
13
|
-
}
|
|
14
|
-
exports.isWeakMap = isWeakMap;
|
|
15
|
-
exports.default = isWeakMap;
|
package/node/isWeakSet.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isWeakSet = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether the payload is a WeakSet
|
|
8
|
-
*
|
|
9
|
-
* @category is
|
|
10
|
-
*/
|
|
11
|
-
function isWeakSet(payload) {
|
|
12
|
-
return (0, getType_1.default)(payload) === "WeakSet";
|
|
13
|
-
}
|
|
14
|
-
exports.isWeakSet = isWeakSet;
|
|
15
|
-
exports.default = isWeakSet;
|
package/node/kbToBytes.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.kbToBytes = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Kilobytes to bytes
|
|
6
|
-
*
|
|
7
|
-
* @category format
|
|
8
|
-
*/
|
|
9
|
-
var kbToBytes = function (bytes) { return bytes * 1000; };
|
|
10
|
-
exports.kbToBytes = kbToBytes;
|
|
11
|
-
exports.default = exports.kbToBytes;
|
package/node/location.js
DELETED
package/node/lowercase.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lowercase = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Replacement for native `toLowercase` tyescript ready (type narrowing ready)
|
|
6
|
-
*
|
|
7
|
-
* @category native
|
|
8
|
-
*/
|
|
9
|
-
var lowercase = function (str) {
|
|
10
|
-
return (str || "").toLowerCase();
|
|
11
|
-
};
|
|
12
|
-
exports.lowercase = lowercase;
|
|
13
|
-
exports.default = exports.lowercase;
|
package/node/mbToBytes.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mbToBytes = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Megabytes to bytes
|
|
6
|
-
*
|
|
7
|
-
* @category format
|
|
8
|
-
*/
|
|
9
|
-
var mbToBytes = function (bytes) { return bytes * 1000 * 1000; };
|
|
10
|
-
exports.mbToBytes = mbToBytes;
|
|
11
|
-
exports.default = exports.mbToBytes;
|
package/node/noop.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.noop = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* No operation function
|
|
6
|
-
*
|
|
7
|
-
* @category native
|
|
8
|
-
*/
|
|
9
|
-
var noop = function () { return void 0; };
|
|
10
|
-
exports.noop = noop;
|
|
11
|
-
exports.default = exports.noop;
|
package/node/normaliseUrl.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normaliseUrl = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var removeTrailingSlash_1 = tslib_1.__importDefault(require("./removeTrailingSlash"));
|
|
6
|
-
/**
|
|
7
|
-
* Normalise URL, it works both for absolute and relative URLs
|
|
8
|
-
*
|
|
9
|
-
* - replaces too many consecutive slashes (except `http{s}://`)
|
|
10
|
-
* - removes the trailing slash
|
|
11
|
-
*
|
|
12
|
-
* @category location
|
|
13
|
-
* @see https://stackoverflow.com/a/40649435/1938970
|
|
14
|
-
*/
|
|
15
|
-
function normaliseUrl(absoluteUrl) {
|
|
16
|
-
if (absoluteUrl === void 0) { absoluteUrl = ""; }
|
|
17
|
-
return (0, removeTrailingSlash_1.default)(absoluteUrl.replace(/(:\/\/)|(\/)+/g, "$1$2"));
|
|
18
|
-
}
|
|
19
|
-
exports.normaliseUrl = normaliseUrl;
|
|
20
|
-
exports.default = normaliseUrl;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normaliseUrlPathname = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var removeTrailingSlash_1 = tslib_1.__importDefault(require("./removeTrailingSlash"));
|
|
6
|
-
/**
|
|
7
|
-
* Normalise URL pathname (relative URL)
|
|
8
|
-
*
|
|
9
|
-
* - replaces too many consecutive slashes
|
|
10
|
-
* - removes the trailing slash
|
|
11
|
-
*
|
|
12
|
-
* @category location
|
|
13
|
-
*/
|
|
14
|
-
function normaliseUrlPathname(pathname) {
|
|
15
|
-
if (pathname === void 0) { pathname = ""; }
|
|
16
|
-
return (0, removeTrailingSlash_1.default)(pathname.replace(/\/+/g, "/"));
|
|
17
|
-
}
|
|
18
|
-
exports.normaliseUrlPathname = normaliseUrlPathname;
|
|
19
|
-
exports.default = normaliseUrlPathname;
|
package/node/randomInt.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.randomInt = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Get random int (min and max included)
|
|
6
|
-
*
|
|
7
|
-
* @category math
|
|
8
|
-
*/
|
|
9
|
-
function randomInt(min, max) {
|
|
10
|
-
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
11
|
-
}
|
|
12
|
-
exports.randomInt = randomInt;
|
|
13
|
-
exports.default = randomInt;
|
package/node/removeAccents.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeAccents = void 0;
|
|
4
|
-
var accentSets_1 = require("./accentSets");
|
|
5
|
-
/**
|
|
6
|
-
* @category text
|
|
7
|
-
*/
|
|
8
|
-
function removeAccents(text, sets) {
|
|
9
|
-
if (text === void 0) { text = ""; }
|
|
10
|
-
if (sets === void 0) { sets = accentSets_1.accentsSets; }
|
|
11
|
-
var len = sets.length;
|
|
12
|
-
while (len--) {
|
|
13
|
-
var _a = sets[len], to = _a[0], from = _a[1];
|
|
14
|
-
text = text.replace(new RegExp("[".concat(from, "]"), "gi"), to);
|
|
15
|
-
}
|
|
16
|
-
return text;
|
|
17
|
-
}
|
|
18
|
-
exports.removeAccents = removeAccents;
|
|
19
|
-
exports.default = removeAccents;
|
package/node/removeCookie.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeCookie = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var cookie_1 = require("./cookie");
|
|
6
|
-
var setCookie_1 = require("./setCookie");
|
|
7
|
-
/**
|
|
8
|
-
* @category cookie
|
|
9
|
-
*
|
|
10
|
-
* All cookie related code is inspired and adapted from:
|
|
11
|
-
* - [js-cookie](https://github.com/js-cookie/js-cookie)
|
|
12
|
-
* - [cookie](https://github.com/jshttp/cookie)
|
|
13
|
-
*/
|
|
14
|
-
function removeCookie(name, attributes) {
|
|
15
|
-
if (attributes === void 0) { attributes = {}; }
|
|
16
|
-
(0, setCookie_1.setCookie)(name, "", tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, cookie_1.defaultAttributesClient), attributes), { expires: -1 }));
|
|
17
|
-
}
|
|
18
|
-
exports.removeCookie = removeCookie;
|
|
19
|
-
exports.default = removeCookie;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeDuplicatesComparing = void 0;
|
|
4
|
-
var removeIndexesFromArray_1 = require("./removeIndexesFromArray");
|
|
5
|
-
var findDuplicatedIndexes_1 = require("./findDuplicatedIndexes");
|
|
6
|
-
/**
|
|
7
|
-
* @category array
|
|
8
|
-
*/
|
|
9
|
-
function removeDuplicatesComparing(from, to) {
|
|
10
|
-
var indexes = (0, findDuplicatedIndexes_1.findDuplicatedIndexes)(from);
|
|
11
|
-
return (0, removeIndexesFromArray_1.removeIndexesFromArray)(to, indexes);
|
|
12
|
-
}
|
|
13
|
-
exports.removeDuplicatesComparing = removeDuplicatesComparing;
|
|
14
|
-
exports.default = removeDuplicatesComparing;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeIndexesFromArray = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @category array
|
|
6
|
-
*/
|
|
7
|
-
function removeIndexesFromArray(arr, indexes) {
|
|
8
|
-
var output = [];
|
|
9
|
-
for (var i = 0; i < arr.length; i++) {
|
|
10
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
11
|
-
if (!indexes.hasOwnProperty(i)) {
|
|
12
|
-
output.push(arr[i]);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return output;
|
|
16
|
-
}
|
|
17
|
-
exports.removeIndexesFromArray = removeIndexesFromArray;
|
|
18
|
-
exports.default = removeIndexesFromArray;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeTralingSlash = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Strips out the trailing slash
|
|
6
|
-
*
|
|
7
|
-
* @category location
|
|
8
|
-
*/
|
|
9
|
-
function removeTralingSlash(urlLike) {
|
|
10
|
-
if (urlLike === void 0) { urlLike = ""; }
|
|
11
|
-
return urlLike.replace(/\/*$/, "");
|
|
12
|
-
}
|
|
13
|
-
exports.removeTralingSlash = removeTralingSlash;
|
|
14
|
-
exports.default = removeTralingSlash;
|