umt 2.12.2 → 2.13.0
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/README.md +60 -0
- package/module/Array/arraysJoin.js +1 -1
- package/module/Array/arraysJoin.js.map +1 -1
- package/module/Array/chunk.js +1 -2
- package/module/Array/chunk.js.map +1 -1
- package/module/Array/generateNumberArray.js +13 -3
- package/module/Array/generateNumberArray.js.map +1 -1
- package/module/Array/getArraysDiff.js +5 -1
- package/module/Array/getArraysDiff.js.map +1 -1
- package/module/Array/mergeSort.js +45 -18
- package/module/Array/mergeSort.js.map +1 -1
- package/module/Array/pop.js +2 -1
- package/module/Array/pop.js.map +1 -1
- package/module/Array/randomSelect.js +8 -0
- package/module/Array/randomSelect.js.map +1 -1
- package/module/Array/sortingHelpers/rangeValidator.js +3 -2
- package/module/Array/sortingHelpers/rangeValidator.js.map +1 -1
- package/module/Array/timSort.js +25 -23
- package/module/Array/timSort.js.map +1 -1
- package/module/Array/ultraNumberSort.js +206 -133
- package/module/Array/ultraNumberSort.js.map +1 -1
- package/module/Async/defer.d.ts +18 -0
- package/module/Async/defer.js +19 -0
- package/module/Async/defer.js.map +1 -0
- package/module/Async/index.d.ts +4 -0
- package/module/Async/index.js +5 -0
- package/module/Async/index.js.map +1 -0
- package/module/Async/parallel.d.ts +10 -0
- package/module/Async/parallel.js +44 -0
- package/module/Async/parallel.js.map +1 -0
- package/module/Async/sleep.d.ts +8 -0
- package/module/Async/sleep.js +11 -0
- package/module/Async/sleep.js.map +1 -0
- package/module/Async/timeout.d.ts +10 -0
- package/module/Async/timeout.js +22 -0
- package/module/Async/timeout.js.map +1 -0
- package/module/Color/cmykToRgba.js +6 -7
- package/module/Color/cmykToRgba.js.map +1 -1
- package/module/Color/hexaToRgba.js +1 -8
- package/module/Color/hexaToRgba.js.map +1 -1
- package/module/Color/hslaToRgba.d.ts +0 -1
- package/module/Color/hslaToRgba.js +7 -22
- package/module/Color/hslaToRgba.js.map +1 -1
- package/module/Color/rgbaToCmyk.js +0 -11
- package/module/Color/rgbaToCmyk.js.map +1 -1
- package/module/Color/rgbaToHexA.js +2 -15
- package/module/Color/rgbaToHexA.js.map +1 -1
- package/module/Color/rgbaToHsla.d.ts +0 -1
- package/module/Color/rgbaToHsla.js +0 -12
- package/module/Color/rgbaToHsla.js.map +1 -1
- package/module/Crypto/constants.d.ts +2 -0
- package/module/Crypto/constants.js +3 -0
- package/module/Crypto/constants.js.map +1 -0
- package/module/Crypto/decodeBase32.js +2 -4
- package/module/Crypto/decodeBase32.js.map +1 -1
- package/module/Crypto/decodeBase58.js +2 -4
- package/module/Crypto/decodeBase58.js.map +1 -1
- package/module/Crypto/encodeBase32.js +2 -1
- package/module/Crypto/encodeBase32.js.map +1 -1
- package/module/Crypto/encodeBase58.js +2 -1
- package/module/Crypto/encodeBase58.js.map +1 -1
- package/module/DataStructure/index.d.ts +2 -0
- package/module/DataStructure/index.js +2 -0
- package/module/DataStructure/index.js.map +1 -1
- package/module/DataStructure/lruCache.d.ts +139 -0
- package/module/DataStructure/lruCache.js +172 -0
- package/module/DataStructure/lruCache.js.map +1 -0
- package/module/DataStructure/ttlCache.d.ts +139 -0
- package/module/DataStructure/ttlCache.js +172 -0
- package/module/DataStructure/ttlCache.js.map +1 -0
- package/module/Error/flatMapResult.d.ts +23 -0
- package/module/Error/flatMapResult.js +28 -0
- package/module/Error/flatMapResult.js.map +1 -0
- package/module/Error/index.d.ts +3 -0
- package/module/Error/index.js +3 -0
- package/module/Error/index.js.map +1 -1
- package/module/Error/mapResult.d.ts +21 -0
- package/module/Error/mapResult.js +27 -0
- package/module/Error/mapResult.js.map +1 -0
- package/module/Error/matchResult.d.ts +25 -0
- package/module/Error/matchResult.js +27 -0
- package/module/Error/matchResult.js.map +1 -0
- package/module/Error/safeExecute.d.ts +16 -3
- package/module/Error/safeExecute.js +5 -2
- package/module/Error/safeExecute.js.map +1 -1
- package/module/Function/debounce.d.ts +38 -0
- package/module/Function/debounce.js +67 -0
- package/module/Function/debounce.js.map +1 -0
- package/module/Function/index.d.ts +4 -0
- package/module/Function/index.js +4 -0
- package/module/Function/index.js.map +1 -1
- package/module/Function/memoize.d.ts +36 -0
- package/module/Function/memoize.js +54 -0
- package/module/Function/memoize.js.map +1 -0
- package/module/Function/once.d.ts +18 -0
- package/module/Function/once.js +29 -0
- package/module/Function/once.js.map +1 -0
- package/module/Function/throttle.d.ts +25 -0
- package/module/Function/throttle.js +55 -0
- package/module/Function/throttle.js.map +1 -0
- package/module/IP/cidrToLong.d.ts +0 -1
- package/module/IP/cidrToLong.js +0 -4
- package/module/IP/cidrToLong.js.map +1 -1
- package/module/IP/cidrToSubnetMask.d.ts +0 -1
- package/module/IP/cidrToSubnetMask.js +0 -1
- package/module/IP/cidrToSubnetMask.js.map +1 -1
- package/module/IP/getNetworkAddress.d.ts +0 -1
- package/module/IP/getNetworkAddress.js +2 -32
- package/module/IP/getNetworkAddress.js.map +1 -1
- package/module/IP/ipToBinaryString.d.ts +0 -1
- package/module/IP/ipToBinaryString.js +2 -25
- package/module/IP/ipToBinaryString.js.map +1 -1
- package/module/IP/ipToLong.d.ts +0 -1
- package/module/IP/ipToLong.js +0 -1
- package/module/IP/ipToLong.js.map +1 -1
- package/module/IP/isInRange.d.ts +0 -1
- package/module/IP/isInRange.js +5 -28
- package/module/IP/isInRange.js.map +1 -1
- package/module/IP/isPrivateIp.d.ts +0 -1
- package/module/IP/isPrivateIp.js +1 -10
- package/module/IP/isPrivateIp.js.map +1 -1
- package/module/IP/longToIp.d.ts +0 -1
- package/module/IP/longToIp.js +0 -8
- package/module/IP/longToIp.js.map +1 -1
- package/module/IP/subnetMaskToCidr.d.ts +0 -1
- package/module/IP/subnetMaskToCidr.js +2 -23
- package/module/IP/subnetMaskToCidr.js.map +1 -1
- package/module/Iterator/index.d.ts +3 -0
- package/module/Iterator/index.js +4 -0
- package/module/Iterator/index.js.map +1 -0
- package/module/Iterator/lazyFilter.d.ts +10 -0
- package/module/Iterator/lazyFilter.js +19 -0
- package/module/Iterator/lazyFilter.js.map +1 -0
- package/module/Iterator/lazyMap.d.ts +10 -0
- package/module/Iterator/lazyMap.js +17 -0
- package/module/Iterator/lazyMap.js.map +1 -0
- package/module/Iterator/lazyTake.d.ts +10 -0
- package/module/Iterator/lazyTake.js +20 -0
- package/module/Iterator/lazyTake.js.map +1 -0
- package/module/Math/addition.js +20 -4
- package/module/Math/addition.js.map +1 -1
- package/module/Math/average.js +3 -3
- package/module/Math/average.js.map +1 -1
- package/module/Math/bitwise.js +1 -1
- package/module/Math/bitwise.js.map +1 -1
- package/module/Math/calculator/core.js +2 -1
- package/module/Math/calculator/core.js.map +1 -1
- package/module/Math/calculator/literalExpression.js +1 -1
- package/module/Math/clamp.d.ts +16 -0
- package/module/Math/clamp.js +19 -0
- package/module/Math/clamp.js.map +1 -0
- package/module/Math/correlationCoefficient.js +0 -3
- package/module/Math/correlationCoefficient.js.map +1 -1
- package/module/Math/inRange.d.ts +19 -0
- package/module/Math/inRange.js +24 -0
- package/module/Math/inRange.js.map +1 -0
- package/module/Math/index.d.ts +3 -0
- package/module/Math/index.js +3 -0
- package/module/Math/index.js.map +1 -1
- package/module/Math/median.js +2 -2
- package/module/Math/median.js.map +1 -1
- package/module/Math/nCr.js +2 -4
- package/module/Math/nCr.js.map +1 -1
- package/module/Math/percentile.js +2 -5
- package/module/Math/percentile.js.map +1 -1
- package/module/Math/primeFactorization.js +1 -1
- package/module/Math/primeFactorization.js.map +1 -1
- package/module/Math/sumPrecise.d.ts +14 -0
- package/module/Math/sumPrecise.js +27 -0
- package/module/Math/sumPrecise.js.map +1 -0
- package/module/Math/uuidv7.js +56 -22
- package/module/Math/uuidv7.js.map +1 -1
- package/module/Number/formatNumber.d.ts +42 -0
- package/module/Number/formatNumber.js +44 -0
- package/module/Number/formatNumber.js.map +1 -0
- package/module/Number/index.d.ts +3 -0
- package/module/Number/index.js +4 -0
- package/module/Number/index.js.map +1 -0
- package/module/Number/toOrdinal.d.ts +20 -0
- package/module/Number/toOrdinal.js +37 -0
- package/module/Number/toOrdinal.js.map +1 -0
- package/module/Number/toPercentage.d.ts +20 -0
- package/module/Number/toPercentage.js +27 -0
- package/module/Number/toPercentage.js.map +1 -0
- package/module/Object/deepClone.d.ts +15 -0
- package/module/Object/deepClone.js +62 -0
- package/module/Object/deepClone.js.map +1 -0
- package/module/Object/getObjectsCommon.d.ts +23 -0
- package/module/Object/getObjectsCommon.js +60 -0
- package/module/Object/getObjectsCommon.js.map +1 -0
- package/module/Object/getObjectsDiff.d.ts +25 -0
- package/module/Object/getObjectsDiff.js +79 -0
- package/module/Object/getObjectsDiff.js.map +1 -0
- package/module/Object/index.d.ts +6 -0
- package/module/Object/index.js +6 -0
- package/module/Object/index.js.map +1 -1
- package/module/Object/isPlainObject.d.ts +16 -0
- package/module/Object/isPlainObject.js +32 -0
- package/module/Object/isPlainObject.js.map +1 -0
- package/module/Object/mapKeys.d.ts +15 -0
- package/module/Object/mapKeys.js +28 -0
- package/module/Object/mapKeys.js.map +1 -0
- package/module/Object/mapValues.d.ts +15 -0
- package/module/Object/mapValues.js +27 -0
- package/module/Object/mapValues.js.map +1 -0
- package/module/Object/mergeDeep.js +4 -9
- package/module/Object/mergeDeep.js.map +1 -1
- package/module/Object/omit.d.ts +1 -1
- package/module/Object/omit.js.map +1 -1
- package/module/Object/pickDeep.js +6 -1
- package/module/Object/pickDeep.js.map +1 -1
- package/module/Predicate/every.d.ts +14 -0
- package/module/Predicate/every.js +22 -0
- package/module/Predicate/every.js.map +1 -0
- package/module/Predicate/index.d.ts +6 -0
- package/module/Predicate/index.js +7 -0
- package/module/Predicate/index.js.map +1 -0
- package/module/Predicate/isNotNullish.d.ts +11 -0
- package/module/Predicate/isNotNullish.js +12 -0
- package/module/Predicate/isNotNullish.js.map +1 -0
- package/module/Predicate/isNullish.d.ts +11 -0
- package/module/Predicate/isNullish.js +12 -0
- package/module/Predicate/isNullish.js.map +1 -0
- package/module/Predicate/matches.d.ts +11 -0
- package/module/Predicate/matches.js +20 -0
- package/module/Predicate/matches.js.map +1 -0
- package/module/Predicate/not.d.ts +10 -0
- package/module/Predicate/not.js +11 -0
- package/module/Predicate/not.js.map +1 -0
- package/module/Predicate/some.d.ts +15 -0
- package/module/Predicate/some.js +23 -0
- package/module/Predicate/some.js.map +1 -0
- package/module/String/camelCase.js +2 -2
- package/module/String/camelCase.js.map +1 -1
- package/module/String/escapeHtml.js +1 -1
- package/module/String/formatString/getValue.js +1 -1
- package/module/String/formatString/getValue.js.map +1 -1
- package/module/String/fromBase64.d.ts +0 -1
- package/module/String/fromBase64.js +1 -9
- package/module/String/fromBase64.js.map +1 -1
- package/module/String/fuzzySearch.js +74 -6
- package/module/String/fuzzySearch.js.map +1 -1
- package/module/String/kebabCase.js +1 -1
- package/module/String/kebabCase.js.map +1 -1
- package/module/String/levenshteinDistance.js +1 -2
- package/module/String/levenshteinDistance.js.map +1 -1
- package/module/String/randomString.js +23 -2
- package/module/String/randomString.js.map +1 -1
- package/module/String/reverseString.js +1 -1
- package/module/String/reverseString.js.map +1 -1
- package/module/String/slugify.js +1 -1
- package/module/String/toHalfWidth.js +2 -2
- package/module/String/toHalfWidth.js.map +1 -1
- package/module/String/truncate.js +0 -3
- package/module/String/truncate.js.map +1 -1
- package/module/String/unescapeHtml.js +1 -1
- package/module/String/unescapeHtml.js.map +1 -1
- package/module/Time/convertTime.js +4 -3
- package/module/Time/convertTime.js.map +1 -1
- package/module/Tool/escapeRegExp.d.ts +8 -0
- package/module/Tool/escapeRegExp.js +11 -0
- package/module/Tool/escapeRegExp.js.map +1 -0
- package/module/Tool/index.d.ts +1 -0
- package/module/Tool/index.js +1 -0
- package/module/Tool/index.js.map +1 -1
- package/module/URL/buildUrl.d.ts +17 -0
- package/module/URL/buildUrl.js +24 -0
- package/module/URL/buildUrl.js.map +1 -0
- package/module/URL/index.d.ts +4 -0
- package/module/URL/index.js +5 -0
- package/module/URL/index.js.map +1 -0
- package/module/URL/isAbsoluteUrl.d.ts +20 -0
- package/module/URL/isAbsoluteUrl.js +23 -0
- package/module/URL/isAbsoluteUrl.js.map +1 -0
- package/module/URL/joinPath.d.ts +24 -0
- package/module/URL/joinPath.js +43 -0
- package/module/URL/joinPath.js.map +1 -0
- package/module/URL/parseQueryString.d.ts +22 -0
- package/module/URL/parseQueryString.js +34 -0
- package/module/URL/parseQueryString.js.map +1 -0
- package/module/Validate/parseEmail.js +5 -5
- package/module/Validate/parseEmail.js.map +1 -1
- package/module/es5/Array/arraysJoin.js +1 -1
- package/module/es5/Array/chunk.js +3 -2
- package/module/es5/Array/generateNumberArray.js +21 -3
- package/module/es5/Array/getArraysDiff.js +5 -3
- package/module/es5/Array/mergeSort.js +51 -19
- package/module/es5/Array/pop.js +2 -7
- package/module/es5/Array/randomSelect.js +8 -0
- package/module/es5/Array/sortingHelpers/rangeValidator.js +3 -2
- package/module/es5/Array/timSort.js +25 -23
- package/module/es5/Array/ultraNumberSort.js +221 -207
- package/module/es5/Async/defer.d.ts +18 -0
- package/module/es5/Async/defer.js +32 -0
- package/module/es5/Async/index.d.ts +4 -0
- package/module/es5/Async/index.js +49 -0
- package/module/es5/Async/parallel.d.ts +10 -0
- package/module/es5/Async/parallel.js +48 -0
- package/module/es5/Async/sleep.d.ts +8 -0
- package/module/es5/Async/sleep.js +18 -0
- package/module/es5/Async/timeout.d.ts +10 -0
- package/module/es5/Async/timeout.js +29 -0
- package/module/es5/Color/cmykToRgba.js +6 -7
- package/module/es5/Color/hexaToRgba.js +7 -5
- package/module/es5/Color/hslaToRgba.d.ts +0 -1
- package/module/es5/Color/hslaToRgba.js +7 -22
- package/module/es5/Color/rgbaToCmyk.js +0 -4
- package/module/es5/Color/rgbaToHexA.js +2 -6
- package/module/es5/Color/rgbaToHsla.d.ts +0 -1
- package/module/es5/Color/rgbaToHsla.js +0 -5
- package/module/es5/Crypto/constants.d.ts +2 -0
- package/module/es5/Crypto/constants.js +8 -0
- package/module/es5/Crypto/decodeBase32.js +2 -4
- package/module/es5/Crypto/decodeBase58.js +2 -4
- package/module/es5/Crypto/encodeBase32.js +2 -1
- package/module/es5/Crypto/encodeBase58.js +2 -1
- package/module/es5/DataStructure/index.d.ts +2 -0
- package/module/es5/DataStructure/index.js +22 -0
- package/module/es5/DataStructure/lruCache.d.ts +139 -0
- package/module/es5/DataStructure/lruCache.js +205 -0
- package/module/es5/DataStructure/ttlCache.d.ts +139 -0
- package/module/es5/DataStructure/ttlCache.js +211 -0
- package/module/es5/Error/flatMapResult.d.ts +23 -0
- package/module/es5/Error/flatMapResult.js +33 -0
- package/module/es5/Error/index.d.ts +3 -0
- package/module/es5/Error/index.js +33 -0
- package/module/es5/Error/mapResult.d.ts +21 -0
- package/module/es5/Error/mapResult.js +32 -0
- package/module/es5/Error/matchResult.d.ts +25 -0
- package/module/es5/Error/matchResult.js +32 -0
- package/module/es5/Error/safeExecute.d.ts +16 -3
- package/module/es5/Error/safeExecute.js +3 -3
- package/module/es5/Function/debounce.d.ts +38 -0
- package/module/es5/Function/debounce.js +88 -0
- package/module/es5/Function/index.d.ts +4 -0
- package/module/es5/Function/index.js +44 -0
- package/module/es5/Function/memoize.d.ts +36 -0
- package/module/es5/Function/memoize.js +73 -0
- package/module/es5/Function/once.d.ts +18 -0
- package/module/es5/Function/once.js +37 -0
- package/module/es5/Function/throttle.d.ts +25 -0
- package/module/es5/Function/throttle.js +69 -0
- package/module/es5/IP/cidrToLong.d.ts +0 -1
- package/module/es5/IP/cidrToLong.js +0 -4
- package/module/es5/IP/cidrToSubnetMask.d.ts +0 -1
- package/module/es5/IP/cidrToSubnetMask.js +0 -1
- package/module/es5/IP/getNetworkAddress.d.ts +0 -1
- package/module/es5/IP/getNetworkAddress.js +2 -31
- package/module/es5/IP/ipToBinaryString.d.ts +0 -1
- package/module/es5/IP/ipToBinaryString.js +1 -40
- package/module/es5/IP/ipToLong.d.ts +0 -1
- package/module/es5/IP/ipToLong.js +0 -1
- package/module/es5/IP/isInRange.d.ts +0 -1
- package/module/es5/IP/isInRange.js +5 -29
- package/module/es5/IP/isPrivateIp.d.ts +0 -1
- package/module/es5/IP/isPrivateIp.js +3 -12
- package/module/es5/IP/longToIp.d.ts +0 -1
- package/module/es5/IP/longToIp.js +0 -6
- package/module/es5/IP/subnetMaskToCidr.d.ts +0 -1
- package/module/es5/IP/subnetMaskToCidr.js +2 -26
- package/module/es5/Iterator/index.d.ts +3 -0
- package/module/es5/Iterator/index.js +38 -0
- package/module/es5/Iterator/lazyFilter.d.ts +10 -0
- package/module/es5/Iterator/lazyFilter.js +63 -0
- package/module/es5/Iterator/lazyMap.d.ts +10 -0
- package/module/es5/Iterator/lazyMap.js +59 -0
- package/module/es5/Iterator/lazyTake.d.ts +10 -0
- package/module/es5/Iterator/lazyTake.js +65 -0
- package/module/es5/Math/addition.js +24 -14
- package/module/es5/Math/average.js +3 -5
- package/module/es5/Math/bitwise.js +1 -1
- package/module/es5/Math/calculator/core.js +2 -1
- package/module/es5/Math/calculator/literalExpression.js +1 -1
- package/module/es5/Math/clamp.d.ts +16 -0
- package/module/es5/Math/clamp.js +24 -0
- package/module/es5/Math/correlationCoefficient.js +0 -3
- package/module/es5/Math/inRange.d.ts +19 -0
- package/module/es5/Math/inRange.js +29 -0
- package/module/es5/Math/index.d.ts +3 -0
- package/module/es5/Math/index.js +33 -0
- package/module/es5/Math/median.js +2 -2
- package/module/es5/Math/nCr.js +2 -4
- package/module/es5/Math/percentile.js +2 -11
- package/module/es5/Math/primeFactorization.js +1 -1
- package/module/es5/Math/sumPrecise.d.ts +14 -0
- package/module/es5/Math/sumPrecise.js +41 -0
- package/module/es5/Math/uuidv7.js +25 -40
- package/module/es5/Number/formatNumber.d.ts +42 -0
- package/module/es5/Number/formatNumber.js +58 -0
- package/module/es5/Number/index.d.ts +3 -0
- package/module/es5/Number/index.js +38 -0
- package/module/es5/Number/toOrdinal.d.ts +20 -0
- package/module/es5/Number/toOrdinal.js +42 -0
- package/module/es5/Number/toPercentage.d.ts +20 -0
- package/module/es5/Number/toPercentage.js +33 -0
- package/module/es5/Object/deepClone.d.ts +15 -0
- package/module/es5/Object/deepClone.js +107 -0
- package/module/es5/Object/getObjectsCommon.d.ts +23 -0
- package/module/es5/Object/getObjectsCommon.js +92 -0
- package/module/es5/Object/getObjectsDiff.d.ts +25 -0
- package/module/es5/Object/getObjectsDiff.js +146 -0
- package/module/es5/Object/index.d.ts +6 -0
- package/module/es5/Object/index.js +66 -0
- package/module/es5/Object/isPlainObject.d.ts +16 -0
- package/module/es5/Object/isPlainObject.js +39 -0
- package/module/es5/Object/mapKeys.d.ts +15 -0
- package/module/es5/Object/mapKeys.js +33 -0
- package/module/es5/Object/mapValues.d.ts +15 -0
- package/module/es5/Object/mapValues.js +32 -0
- package/module/es5/Object/mergeDeep.js +7 -10
- package/module/es5/Object/omit.d.ts +1 -1
- package/module/es5/Object/pickDeep.js +4 -6
- package/module/es5/Predicate/every.d.ts +14 -0
- package/module/es5/Predicate/every.js +33 -0
- package/module/es5/Predicate/index.d.ts +6 -0
- package/module/es5/Predicate/index.js +71 -0
- package/module/es5/Predicate/isNotNullish.d.ts +11 -0
- package/module/es5/Predicate/isNotNullish.js +19 -0
- package/module/es5/Predicate/isNullish.d.ts +11 -0
- package/module/es5/Predicate/isNullish.js +19 -0
- package/module/es5/Predicate/matches.d.ts +11 -0
- package/module/es5/Predicate/matches.js +28 -0
- package/module/es5/Predicate/not.d.ts +10 -0
- package/module/es5/Predicate/not.js +20 -0
- package/module/es5/Predicate/some.d.ts +15 -0
- package/module/es5/Predicate/some.js +34 -0
- package/module/es5/String/camelCase.js +2 -2
- package/module/es5/String/escapeHtml.js +1 -1
- package/module/es5/String/formatString/getValue.js +1 -1
- package/module/es5/String/fromBase64.d.ts +0 -1
- package/module/es5/String/fromBase64.js +9 -8
- package/module/es5/String/fuzzySearch.js +84 -9
- package/module/es5/String/kebabCase.js +1 -1
- package/module/es5/String/levenshteinDistance.js +3 -2
- package/module/es5/String/randomString.js +24 -2
- package/module/es5/String/reverseString.js +7 -1
- package/module/es5/String/slugify.js +1 -1
- package/module/es5/String/toHalfWidth.js +2 -2
- package/module/es5/String/truncate.js +0 -3
- package/module/es5/String/unescapeHtml.js +1 -1
- package/module/es5/Time/convertTime.js +4 -3
- package/module/es5/Tool/escapeRegExp.d.ts +8 -0
- package/module/es5/Tool/escapeRegExp.js +18 -0
- package/module/es5/Tool/index.d.ts +1 -0
- package/module/es5/Tool/index.js +11 -0
- package/module/es5/URL/buildUrl.d.ts +17 -0
- package/module/es5/URL/buildUrl.js +31 -0
- package/module/es5/URL/index.d.ts +4 -0
- package/module/es5/URL/index.js +49 -0
- package/module/es5/URL/isAbsoluteUrl.d.ts +20 -0
- package/module/es5/URL/isAbsoluteUrl.js +28 -0
- package/module/es5/URL/joinPath.d.ts +24 -0
- package/module/es5/URL/joinPath.js +48 -0
- package/module/es5/URL/parseQueryString.d.ts +22 -0
- package/module/es5/URL/parseQueryString.js +57 -0
- package/module/es5/Validate/parseEmail.js +5 -5
- package/module/es5/index.d.ts +25 -20
- package/module/es5/index.js +135 -80
- package/module/es5/tsconfig.tsbuildinfo +1 -1
- package/module/index.d.ts +25 -20
- package/module/index.js +25 -20
- package/module/index.js.map +1 -1
- package/package.json +43 -17
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an object with the same values as the given object, but
|
|
3
|
+
* with keys transformed by the provided function.
|
|
4
|
+
*
|
|
5
|
+
* @param object - The source object.
|
|
6
|
+
* @param function_ - The function invoked per key. Receives (value, key).
|
|
7
|
+
* @returns A new object with transformed keys.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* mapKeys({ a: 1, b: 2 }, (_value, key) => key.toUpperCase());
|
|
12
|
+
* // { A: 1, B: 2 }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const mapKeys: <T extends Record<string, unknown>>(object: T, function_: (value: T[keyof T], key: string) => string) => Record<string, T[keyof T]>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mapKeys = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Creates an object with the same values as the given object, but
|
|
9
|
+
* with keys transformed by the provided function.
|
|
10
|
+
*
|
|
11
|
+
* @param object - The source object.
|
|
12
|
+
* @param function_ - The function invoked per key. Receives (value, key).
|
|
13
|
+
* @returns A new object with transformed keys.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* mapKeys({ a: 1, b: 2 }, (_value, key) => key.toUpperCase());
|
|
18
|
+
* // { A: 1, B: 2 }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
var mapKeys = exports.mapKeys = function mapKeys(object, function_) {
|
|
22
|
+
var result = {};
|
|
23
|
+
var keys = Object.keys(object);
|
|
24
|
+
var length = keys.length;
|
|
25
|
+
var index = 0;
|
|
26
|
+
while (index < length) {
|
|
27
|
+
var key = keys[index];
|
|
28
|
+
var value = object[key];
|
|
29
|
+
result[function_(value, key)] = value;
|
|
30
|
+
index += 1;
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an object with the same keys as the given object, but
|
|
3
|
+
* with values transformed by the provided function.
|
|
4
|
+
*
|
|
5
|
+
* @param object - The source object.
|
|
6
|
+
* @param function_ - The function invoked per value. Receives (value, key).
|
|
7
|
+
* @returns A new object with transformed values.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* mapValues({ a: 1, b: 2 }, (value) => value * 2);
|
|
12
|
+
* // { a: 2, b: 4 }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const mapValues: <T extends Record<string, unknown>, R>(object: T, function_: (value: T[keyof T], key: string) => R) => Record<keyof T, R>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mapValues = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Creates an object with the same keys as the given object, but
|
|
9
|
+
* with values transformed by the provided function.
|
|
10
|
+
*
|
|
11
|
+
* @param object - The source object.
|
|
12
|
+
* @param function_ - The function invoked per value. Receives (value, key).
|
|
13
|
+
* @returns A new object with transformed values.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* mapValues({ a: 1, b: 2 }, (value) => value * 2);
|
|
18
|
+
* // { a: 2, b: 4 }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
var mapValues = exports.mapValues = function mapValues(object, function_) {
|
|
22
|
+
var result = {};
|
|
23
|
+
var keys = Object.keys(object);
|
|
24
|
+
var length = keys.length;
|
|
25
|
+
var index = 0;
|
|
26
|
+
while (index < length) {
|
|
27
|
+
var key = keys[index];
|
|
28
|
+
result[key] = function_(object[key], key);
|
|
29
|
+
index += 1;
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mergeDeep = void 0;
|
|
7
|
+
var _isPlainObject = require("../Object/isPlainObject");
|
|
8
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
11
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
10
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
11
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
-
/**
|
|
14
|
-
* Checks if a value is a plain object
|
|
15
|
-
*/
|
|
16
|
-
var isPlainObject = function isPlainObject(value) {
|
|
17
|
-
return value !== null && _typeof(value) === "object" && value.constructor === Object && Object.prototype.toString.call(value) === "[object Object]";
|
|
18
|
-
};
|
|
19
|
-
|
|
20
14
|
/**
|
|
21
15
|
* Deeply merges multiple objects into a single object
|
|
22
16
|
* @param target - The target object to merge into
|
|
@@ -31,13 +25,16 @@ var _mergeDeep = exports.mergeDeep = function mergeDeep(target) {
|
|
|
31
25
|
return target;
|
|
32
26
|
}
|
|
33
27
|
var source = sources.shift();
|
|
34
|
-
if (isPlainObject(target) && isPlainObject(source)) {
|
|
28
|
+
if ((0, _isPlainObject.isPlainObject)(target) && (0, _isPlainObject.isPlainObject)(source)) {
|
|
35
29
|
var result = _objectSpread({}, target);
|
|
36
30
|
for (var key in source) {
|
|
31
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
37
34
|
if (Object.hasOwn(source, key)) {
|
|
38
35
|
var sourceValue = source[key];
|
|
39
36
|
var targetValue = result[key];
|
|
40
|
-
result[key] = isPlainObject(targetValue) && isPlainObject(sourceValue) ? _mergeDeep(targetValue, sourceValue) : sourceValue;
|
|
37
|
+
result[key] = (0, _isPlainObject.isPlainObject)(targetValue) && (0, _isPlainObject.isPlainObject)(sourceValue) ? _mergeDeep(targetValue, sourceValue) : sourceValue;
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
return _mergeDeep.apply(void 0, [result].concat(sources));
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @param keys - The keys to omit
|
|
5
5
|
* @returns A new object without the specified keys
|
|
6
6
|
*/
|
|
7
|
-
export declare const omit: <T extends object, K extends keyof T>(object: T, ...keys:
|
|
7
|
+
export declare const omit: <T extends object, K extends keyof T>(object: T, ...keys: (keyof T)[]) => Omit<T, K>;
|
|
@@ -12,11 +12,6 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
12
12
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
13
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
14
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
15
|
/**
|
|
21
16
|
* Creates a new object by deeply selecting properties from the source object based on specified keys.
|
|
22
17
|
*
|
|
@@ -43,7 +38,7 @@ var pickDeep = exports.pickDeep = function pickDeep(object) {
|
|
|
43
38
|
var key = _keys[_i];
|
|
44
39
|
var parts = key.split(".");
|
|
45
40
|
// biome-ignore lint/suspicious/noExplicitAny: ignore
|
|
46
|
-
var current =
|
|
41
|
+
var current = object;
|
|
47
42
|
// biome-ignore lint/suspicious/noExplicitAny: ignore
|
|
48
43
|
var target = result;
|
|
49
44
|
var _iterator = _createForOfIteratorHelper(parts.entries()),
|
|
@@ -53,6 +48,9 @@ var pickDeep = exports.pickDeep = function pickDeep(object) {
|
|
|
53
48
|
var _step$value = _slicedToArray(_step.value, 2),
|
|
54
49
|
index = _step$value[0],
|
|
55
50
|
part = _step$value[1];
|
|
51
|
+
if (part === "__proto__" || part === "constructor" || part === "prototype") {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
56
54
|
if (current && _typeof(current) === "object" && part in current) {
|
|
57
55
|
if (index === parts.length - 1) {
|
|
58
56
|
target[part] = current[part];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a predicate that returns true only when all given
|
|
3
|
+
* predicates return true, using short-circuit evaluation
|
|
4
|
+
* @param {((...arguments_: T) => boolean)[]} predicates - The predicates to combine
|
|
5
|
+
* @returns {(...arguments_: T) => boolean} A combined predicate
|
|
6
|
+
* @example
|
|
7
|
+
* const isPositiveEven = every(
|
|
8
|
+
* (n: number) => n > 0,
|
|
9
|
+
* (n: number) => n % 2 === 0,
|
|
10
|
+
* );
|
|
11
|
+
* isPositiveEven(4); // true
|
|
12
|
+
* isPositiveEven(-2); // false
|
|
13
|
+
*/
|
|
14
|
+
export declare const every: <T extends unknown[]>(...predicates: ((...arguments_: T) => boolean)[]) => ((...arguments_: T) => boolean);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.every = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a predicate that returns true only when all given
|
|
9
|
+
* predicates return true, using short-circuit evaluation
|
|
10
|
+
* @param {((...arguments_: T) => boolean)[]} predicates - The predicates to combine
|
|
11
|
+
* @returns {(...arguments_: T) => boolean} A combined predicate
|
|
12
|
+
* @example
|
|
13
|
+
* const isPositiveEven = every(
|
|
14
|
+
* (n: number) => n > 0,
|
|
15
|
+
* (n: number) => n % 2 === 0,
|
|
16
|
+
* );
|
|
17
|
+
* isPositiveEven(4); // true
|
|
18
|
+
* isPositiveEven(-2); // false
|
|
19
|
+
*/
|
|
20
|
+
var every = exports.every = function every() {
|
|
21
|
+
for (var _len = arguments.length, predicates = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
|
+
predicates[_key] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
return function () {
|
|
25
|
+
for (var _i = 0, _predicates = predicates; _i < _predicates.length; _i++) {
|
|
26
|
+
var predicate = _predicates[_i];
|
|
27
|
+
if (!predicate.apply(void 0, arguments)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _every = require("./every");
|
|
7
|
+
Object.keys(_every).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _every[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _every[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _isNotNullish = require("./isNotNullish");
|
|
18
|
+
Object.keys(_isNotNullish).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _isNotNullish[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _isNotNullish[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _isNullish = require("./isNullish");
|
|
29
|
+
Object.keys(_isNullish).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _isNullish[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _isNullish[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _matches = require("./matches");
|
|
40
|
+
Object.keys(_matches).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _matches[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function get() {
|
|
46
|
+
return _matches[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _not = require("./not");
|
|
51
|
+
Object.keys(_not).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _not[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _not[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _some = require("./some");
|
|
62
|
+
Object.keys(_some).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _some[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function get() {
|
|
68
|
+
return _some[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether a value is null or undefined
|
|
3
|
+
* @param {unknown} value - The value to check
|
|
4
|
+
* @returns {boolean} True if the value is null or undefined
|
|
5
|
+
* @example
|
|
6
|
+
* isNotNullish(null); // false
|
|
7
|
+
* isNotNullish(undefined); // false
|
|
8
|
+
* isNotNullish(0); // true
|
|
9
|
+
* isNotNullish(""); // true
|
|
10
|
+
*/
|
|
11
|
+
export declare const isNotNullish: <T>(value: T) => value is Exclude<T, null | undefined>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isNotNullish = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Checks whether a value is null or undefined
|
|
9
|
+
* @param {unknown} value - The value to check
|
|
10
|
+
* @returns {boolean} True if the value is null or undefined
|
|
11
|
+
* @example
|
|
12
|
+
* isNotNullish(null); // false
|
|
13
|
+
* isNotNullish(undefined); // false
|
|
14
|
+
* isNotNullish(0); // true
|
|
15
|
+
* isNotNullish(""); // true
|
|
16
|
+
*/
|
|
17
|
+
var isNotNullish = exports.isNotNullish = function isNotNullish(value) {
|
|
18
|
+
return value !== null && value !== undefined;
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether a value is null or undefined
|
|
3
|
+
* @param {unknown} value - The value to check
|
|
4
|
+
* @returns {boolean} True if the value is null or undefined
|
|
5
|
+
* @example
|
|
6
|
+
* isNullish(null); // true
|
|
7
|
+
* isNullish(undefined); // true
|
|
8
|
+
* isNullish(0); // false
|
|
9
|
+
* isNullish(""); // false
|
|
10
|
+
*/
|
|
11
|
+
export declare const isNullish: (value: unknown) => value is null | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isNullish = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Checks whether a value is null or undefined
|
|
9
|
+
* @param {unknown} value - The value to check
|
|
10
|
+
* @returns {boolean} True if the value is null or undefined
|
|
11
|
+
* @example
|
|
12
|
+
* isNullish(null); // true
|
|
13
|
+
* isNullish(undefined); // true
|
|
14
|
+
* isNullish(0); // false
|
|
15
|
+
* isNullish(""); // false
|
|
16
|
+
*/
|
|
17
|
+
var isNullish = exports.isNullish = function isNullish(value) {
|
|
18
|
+
return value === null || value === undefined;
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a predicate that checks whether an object matches
|
|
3
|
+
* all properties of the given pattern using strict equality
|
|
4
|
+
* @param {Record<string, unknown>} pattern - The pattern to match against
|
|
5
|
+
* @returns {(obj: Record<string, unknown>) => boolean} A predicate that tests objects
|
|
6
|
+
* @example
|
|
7
|
+
* const isAdmin = matches({ role: "admin" });
|
|
8
|
+
* isAdmin({ name: "Alice", role: "admin" }); // true
|
|
9
|
+
* isAdmin({ name: "Bob", role: "user" }); // false
|
|
10
|
+
*/
|
|
11
|
+
export declare const matches: (pattern: Record<string, unknown>) => ((object: Record<string, unknown>) => boolean);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.matches = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a predicate that checks whether an object matches
|
|
9
|
+
* all properties of the given pattern using strict equality
|
|
10
|
+
* @param {Record<string, unknown>} pattern - The pattern to match against
|
|
11
|
+
* @returns {(obj: Record<string, unknown>) => boolean} A predicate that tests objects
|
|
12
|
+
* @example
|
|
13
|
+
* const isAdmin = matches({ role: "admin" });
|
|
14
|
+
* isAdmin({ name: "Alice", role: "admin" }); // true
|
|
15
|
+
* isAdmin({ name: "Bob", role: "user" }); // false
|
|
16
|
+
*/
|
|
17
|
+
var matches = exports.matches = function matches(pattern) {
|
|
18
|
+
return function (object) {
|
|
19
|
+
var keys = Object.keys(pattern);
|
|
20
|
+
for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
|
|
21
|
+
var key = _keys[_i];
|
|
22
|
+
if (object[key] !== pattern[key]) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a predicate that negates the given predicate
|
|
3
|
+
* @param {(...arguments_: T) => boolean} function_ - The predicate to negate
|
|
4
|
+
* @returns {(...arguments_: T) => boolean} A new predicate that returns the opposite
|
|
5
|
+
* @example
|
|
6
|
+
* const isEven = (n: number) => n % 2 === 0;
|
|
7
|
+
* const isOdd = not(isEven);
|
|
8
|
+
* isOdd(3); // true
|
|
9
|
+
*/
|
|
10
|
+
export declare const not: <T extends unknown[]>(function_: (...arguments_: T) => boolean) => ((...arguments_: T) => boolean);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.not = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a predicate that negates the given predicate
|
|
9
|
+
* @param {(...arguments_: T) => boolean} function_ - The predicate to negate
|
|
10
|
+
* @returns {(...arguments_: T) => boolean} A new predicate that returns the opposite
|
|
11
|
+
* @example
|
|
12
|
+
* const isEven = (n: number) => n % 2 === 0;
|
|
13
|
+
* const isOdd = not(isEven);
|
|
14
|
+
* isOdd(3); // true
|
|
15
|
+
*/
|
|
16
|
+
var not = exports.not = function not(function_) {
|
|
17
|
+
return function () {
|
|
18
|
+
return !function_.apply(void 0, arguments);
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a predicate that returns true when at least one of
|
|
3
|
+
* the given predicates returns true, using short-circuit evaluation
|
|
4
|
+
* @param {((...arguments_: T) => boolean)[]} predicates - The predicates to combine
|
|
5
|
+
* @returns {(...arguments_: T) => boolean} A combined predicate
|
|
6
|
+
* @example
|
|
7
|
+
* const isZeroOrNegative = some(
|
|
8
|
+
* (n: number) => n === 0,
|
|
9
|
+
* (n: number) => n < 0,
|
|
10
|
+
* );
|
|
11
|
+
* isZeroOrNegative(0); // true
|
|
12
|
+
* isZeroOrNegative(-1); // true
|
|
13
|
+
* isZeroOrNegative(1); // false
|
|
14
|
+
*/
|
|
15
|
+
export declare const some: <T extends unknown[]>(...predicates: ((...arguments_: T) => boolean)[]) => ((...arguments_: T) => boolean);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.some = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a predicate that returns true when at least one of
|
|
9
|
+
* the given predicates returns true, using short-circuit evaluation
|
|
10
|
+
* @param {((...arguments_: T) => boolean)[]} predicates - The predicates to combine
|
|
11
|
+
* @returns {(...arguments_: T) => boolean} A combined predicate
|
|
12
|
+
* @example
|
|
13
|
+
* const isZeroOrNegative = some(
|
|
14
|
+
* (n: number) => n === 0,
|
|
15
|
+
* (n: number) => n < 0,
|
|
16
|
+
* );
|
|
17
|
+
* isZeroOrNegative(0); // true
|
|
18
|
+
* isZeroOrNegative(-1); // true
|
|
19
|
+
* isZeroOrNegative(1); // false
|
|
20
|
+
*/
|
|
21
|
+
var some = exports.some = function some() {
|
|
22
|
+
for (var _len = arguments.length, predicates = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
|
+
predicates[_key] = arguments[_key];
|
|
24
|
+
}
|
|
25
|
+
return function () {
|
|
26
|
+
for (var _i = 0, _predicates = predicates; _i < _predicates.length; _i++) {
|
|
27
|
+
var predicate = _predicates[_i];
|
|
28
|
+
if (predicate.apply(void 0, arguments)) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -10,9 +10,9 @@ exports.camelCase = void 0;
|
|
|
10
10
|
* @returns The camelCase string
|
|
11
11
|
*/
|
|
12
12
|
var camelCase = exports.camelCase = function camelCase(string_) {
|
|
13
|
-
return string_.replaceAll(/[
|
|
13
|
+
return string_.replaceAll(/[^\dA-Za-z]+(.)/g, function (_, _char) {
|
|
14
14
|
return _char.toUpperCase();
|
|
15
|
-
}).replaceAll(/[
|
|
15
|
+
}).replaceAll(/[^\dA-Za-z]+$/g, "").replace(/^[A-Z]/, function (_char2) {
|
|
16
16
|
return _char2.toLowerCase();
|
|
17
17
|
});
|
|
18
18
|
};
|
|
@@ -21,7 +21,7 @@ var htmlEscapeMap = {
|
|
|
21
21
|
* @returns The escaped string
|
|
22
22
|
*/
|
|
23
23
|
var escapeHtml = exports.escapeHtml = function escapeHtml(string_) {
|
|
24
|
-
return string_.replaceAll(/[
|
|
24
|
+
return string_.replaceAll(/["&'<>]/g, function (match) {
|
|
25
25
|
return htmlEscapeMap[match];
|
|
26
26
|
});
|
|
27
27
|
};
|
|
@@ -46,7 +46,7 @@ function getValue(object, path) {
|
|
|
46
46
|
try {
|
|
47
47
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
48
48
|
var part = _step.value;
|
|
49
|
-
var arrayMatch = /^(.+?)\[(-?\d+)
|
|
49
|
+
var arrayMatch = /^(.+?)\[(-?\d+)]$/.exec(part);
|
|
50
50
|
if (arrayMatch) {
|
|
51
51
|
var _arrayMatch = _slicedToArray(arrayMatch, 3),
|
|
52
52
|
key = _arrayMatch[1],
|
|
@@ -5,21 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.fromBase64 = void 0;
|
|
7
7
|
var _unwrap = require("../Tool/unwrap");
|
|
8
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
9
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
12
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
14
|
/**
|
|
9
15
|
* Converts Base64 to string
|
|
10
16
|
* @param {string} base64String - Base64 encoded string
|
|
11
17
|
* @returns Decoded string from Base64
|
|
12
|
-
* @throws {Error} When input is not a valid Base64 string
|
|
13
18
|
*/
|
|
14
19
|
var fromBase64 = exports.fromBase64 = function fromBase64(base64String) {
|
|
15
20
|
if (base64String === "") {
|
|
16
21
|
return "";
|
|
17
22
|
}
|
|
18
|
-
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
})));
|
|
22
|
-
} catch (_unused) {
|
|
23
|
-
throw new Error("Invalid Base64 string");
|
|
24
|
-
}
|
|
23
|
+
return new TextDecoder().decode(Uint8Array.from(_toConsumableArray(atob(base64String)).map(function (c) {
|
|
24
|
+
return (0, _unwrap.unwrap)(c.codePointAt(0), "panic: invalid base64 string");
|
|
25
|
+
})));
|
|
25
26
|
};
|