umt 2.5.0 → 2.7.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 +36 -0
- package/module/Array/generateNumberArray.js +13 -7
- package/module/Array/generateNumberArray.js.map +1 -1
- package/module/Array/getArraysCommon.js +21 -3
- package/module/Array/getArraysCommon.js.map +1 -1
- package/module/Array/groupBy.js +1 -1
- package/module/Array/groupBy.js.map +1 -1
- package/module/Array/index.d.ts +2 -0
- package/module/Array/index.js +2 -0
- package/module/Array/index.js.map +1 -1
- package/module/Array/ultraNumberSort.js +2 -2
- package/module/Array/ultraNumberSort.js.map +1 -1
- package/module/Array/uniqBy.d.ts +7 -0
- package/module/Array/uniqBy.js +19 -0
- package/module/Array/uniqBy.js.map +1 -0
- package/module/Array/unique.d.ts +6 -0
- package/module/Array/unique.js +9 -0
- package/module/Array/unique.js.map +1 -0
- package/module/Color/rgbaToHsla.js +1 -1
- package/module/Color/rgbaToHsla.js.map +1 -1
- package/module/Crypto/decodeBase32.d.ts +7 -0
- package/module/Crypto/decodeBase32.js +27 -0
- package/module/Crypto/decodeBase32.js.map +1 -0
- package/module/Crypto/decodeBase32ToString.d.ts +7 -0
- package/module/Crypto/decodeBase32ToString.js +11 -0
- package/module/Crypto/decodeBase32ToString.js.map +1 -0
- package/module/Crypto/decodeBase58.d.ts +7 -0
- package/module/Crypto/decodeBase58.js +34 -0
- package/module/Crypto/decodeBase58.js.map +1 -0
- package/module/Crypto/decodeBase58ToString.d.ts +7 -0
- package/module/Crypto/decodeBase58ToString.js +11 -0
- package/module/Crypto/decodeBase58ToString.js.map +1 -0
- package/module/Crypto/encodeBase32.d.ts +7 -0
- package/module/Crypto/encodeBase32.js +28 -0
- package/module/Crypto/encodeBase32.js.map +1 -0
- package/module/Crypto/encodeBase58.d.ts +7 -0
- package/module/Crypto/encodeBase58.js +29 -0
- package/module/Crypto/encodeBase58.js.map +1 -0
- package/module/Crypto/index.d.ts +6 -0
- package/module/Crypto/index.js +7 -0
- package/module/Crypto/index.js.map +1 -0
- package/module/DataStructure/index.d.ts +1 -0
- package/module/DataStructure/index.js +2 -0
- package/module/DataStructure/index.js.map +1 -0
- package/module/DataStructure/priorityQueue.d.ts +241 -0
- package/module/DataStructure/priorityQueue.js +327 -0
- package/module/DataStructure/priorityQueue.js.map +1 -0
- package/module/Date/birthday.js +14 -6
- package/module/Date/birthday.js.map +1 -1
- package/module/Date/isLeapYear.js +3 -0
- package/module/Date/isLeapYear.js.map +1 -1
- package/module/Error/index.d.ts +1 -0
- package/module/Error/index.js +1 -0
- package/module/Error/index.js.map +1 -1
- package/module/Error/retry.d.ts +37 -0
- package/module/Error/retry.js +47 -0
- package/module/Error/retry.js.map +1 -0
- package/module/IP/getIpClass.js +1 -1
- package/module/IP/getIpClass.js.map +1 -1
- package/module/IP/getNetworkAddress.js +2 -2
- package/module/IP/getNetworkAddress.js.map +1 -1
- package/module/IP/ipToBinaryString.js +2 -2
- package/module/IP/ipToBinaryString.js.map +1 -1
- package/module/IP/subnetMaskToCidr.js +1 -1
- package/module/IP/subnetMaskToCidr.js.map +1 -1
- package/module/Math/calculator/core.js +21 -13
- package/module/Math/calculator/core.js.map +1 -1
- package/module/Math/calculator/literalExpression.js +19 -7
- package/module/Math/calculator/literalExpression.js.map +1 -1
- package/module/Math/correlationCoefficient.d.ts +11 -0
- package/module/Math/correlationCoefficient.js +40 -0
- package/module/Math/correlationCoefficient.js.map +1 -0
- package/module/Math/division.js +3 -3
- package/module/Math/division.js.map +1 -1
- package/module/Math/gcd.js +26 -4
- package/module/Math/gcd.js.map +1 -1
- 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/mode.d.ts +10 -0
- package/module/Math/mode.js +31 -0
- package/module/Math/mode.js.map +1 -0
- package/module/Math/percentile.d.ts +11 -0
- package/module/Math/percentile.js +31 -0
- package/module/Math/percentile.js.map +1 -0
- package/module/Math/standardDeviation.js +4 -2
- package/module/Math/standardDeviation.js.map +1 -1
- package/module/Object/has.js +1 -2
- package/module/Object/has.js.map +1 -1
- package/module/Object/index.d.ts +4 -0
- package/module/Object/index.js +4 -0
- package/module/Object/index.js.map +1 -1
- package/module/Object/isEmpty.d.ts +6 -0
- package/module/Object/isEmpty.js +20 -0
- package/module/Object/isEmpty.js.map +1 -0
- package/module/Object/merge.d.ts +8 -0
- package/module/Object/merge.js +10 -0
- package/module/Object/merge.js.map +1 -0
- package/module/Object/mergeDeep.d.ts +8 -0
- package/module/Object/mergeDeep.js +37 -0
- package/module/Object/mergeDeep.js.map +1 -0
- package/module/Object/omit.d.ts +7 -0
- package/module/Object/omit.js +14 -0
- package/module/Object/omit.js.map +1 -0
- package/module/Object/pickDeep.d.ts +2 -2
- package/module/Object/pickDeep.js +4 -4
- package/module/Object/pickDeep.js.map +1 -1
- package/module/Simple/Date/dayOfWeekSimple.js +3 -3
- package/module/Simple/Date/dayOfWeekSimple.js.map +1 -1
- package/module/String/camelCase.d.ts +6 -0
- package/module/String/camelCase.js +12 -0
- package/module/String/camelCase.js.map +1 -0
- package/module/String/escapeHtml.d.ts +6 -0
- package/module/String/escapeHtml.js +19 -0
- package/module/String/escapeHtml.js.map +1 -0
- package/module/String/formatString/applyFormatter.d.ts +25 -0
- package/module/String/formatString/applyFormatter.js +71 -0
- package/module/String/formatString/applyFormatter.js.map +1 -0
- package/module/String/formatString/defaultFormatters.d.ts +24 -0
- package/module/String/formatString/defaultFormatters.js +59 -0
- package/module/String/formatString/defaultFormatters.js.map +1 -0
- package/module/String/formatString/detectMode.d.ts +26 -0
- package/module/String/formatString/detectMode.js +61 -0
- package/module/String/formatString/detectMode.js.map +1 -0
- package/module/String/formatString/getValue.d.ts +27 -0
- package/module/String/formatString/getValue.js +56 -0
- package/module/String/formatString/getValue.js.map +1 -0
- package/module/String/formatString/index.d.ts +91 -0
- package/module/String/formatString/index.js +38 -0
- package/module/String/formatString/index.js.map +1 -0
- package/module/String/fuzzySearch.d.ts +14 -0
- package/module/String/fuzzySearch.js +27 -0
- package/module/String/fuzzySearch.js.map +1 -0
- package/module/String/index.d.ts +9 -0
- package/module/String/index.js +9 -0
- package/module/String/index.js.map +1 -1
- package/module/String/kebabCase.d.ts +6 -0
- package/module/String/kebabCase.js +22 -0
- package/module/String/kebabCase.js.map +1 -0
- package/module/String/levenshteinDistance.d.ts +8 -0
- package/module/String/levenshteinDistance.js +38 -0
- package/module/String/levenshteinDistance.js.map +1 -0
- package/module/String/slugify.d.ts +10 -0
- package/module/String/slugify.js +21 -0
- package/module/String/slugify.js.map +1 -0
- package/module/String/stringSimilarity.d.ts +8 -0
- package/module/String/stringSimilarity.js +23 -0
- package/module/String/stringSimilarity.js.map +1 -0
- package/module/String/truncate.d.ts +12 -0
- package/module/String/truncate.js +21 -0
- package/module/String/truncate.js.map +1 -0
- package/module/String/unescapeHtml.d.ts +17 -0
- package/module/String/unescapeHtml.js +45 -0
- package/module/String/unescapeHtml.js.map +1 -0
- package/module/Validate/core/index.js +0 -1
- package/module/Validate/core/index.js.map +1 -1
- package/module/Validate/index.d.ts +1 -0
- package/module/Validate/index.js +1 -0
- package/module/Validate/index.js.map +1 -1
- package/module/Validate/isDeepEqual.d.ts +28 -0
- package/module/Validate/isDeepEqual.js +148 -0
- package/module/Validate/isDeepEqual.js.map +1 -0
- package/module/Validate/isDouble.js +1 -1
- package/module/Validate/isDouble.js.map +1 -1
- package/module/Validate/isNode.js +1 -0
- package/module/Validate/isNode.js.map +1 -1
- package/module/Validate/isNumber.js +1 -1
- package/module/Validate/isNumber.js.map +1 -1
- package/module/Validate/isValueNaN.js +1 -1
- package/module/Validate/isValueNaN.js.map +1 -1
- package/module/Validate/number/even.js +7 -1
- package/module/Validate/number/even.js.map +1 -1
- package/module/Validate/number/odd.js +7 -1
- package/module/Validate/number/odd.js.map +1 -1
- package/module/Validate/string/email.js +20 -2
- package/module/Validate/string/email.js.map +1 -1
- package/module/es5/Array/generateNumberArray.js +15 -9
- package/module/es5/Array/getArraysCommon.js +39 -4
- package/module/es5/Array/groupBy.js +1 -1
- package/module/es5/Array/index.d.ts +2 -0
- package/module/es5/Array/index.js +22 -0
- package/module/es5/Array/ultraNumberSort.js +2 -2
- package/module/es5/Array/uniqBy.d.ts +7 -0
- package/module/es5/Array/uniqBy.js +36 -0
- package/module/es5/Array/unique.d.ts +6 -0
- package/module/es5/Array/unique.js +20 -0
- package/module/es5/Color/rgbaToHsla.js +1 -1
- package/module/es5/Crypto/decodeBase32.d.ts +7 -0
- package/module/es5/Crypto/decodeBase32.js +44 -0
- package/module/es5/Crypto/decodeBase32ToString.d.ts +7 -0
- package/module/es5/Crypto/decodeBase32ToString.js +16 -0
- package/module/es5/Crypto/decodeBase58.d.ts +7 -0
- package/module/es5/Crypto/decodeBase58.js +63 -0
- package/module/es5/Crypto/decodeBase58ToString.d.ts +7 -0
- package/module/es5/Crypto/decodeBase58ToString.js +16 -0
- package/module/es5/Crypto/encodeBase32.d.ts +7 -0
- package/module/es5/Crypto/encodeBase32.js +45 -0
- package/module/es5/Crypto/encodeBase58.d.ts +7 -0
- package/module/es5/Crypto/encodeBase58.js +55 -0
- package/module/es5/Crypto/index.d.ts +6 -0
- package/module/es5/Crypto/index.js +71 -0
- package/module/es5/DataStructure/index.d.ts +1 -0
- package/module/es5/DataStructure/index.js +16 -0
- package/module/es5/DataStructure/priorityQueue.d.ts +241 -0
- package/module/es5/DataStructure/priorityQueue.js +405 -0
- package/module/es5/Date/birthday.js +17 -3
- package/module/es5/Date/isLeapYear.js +3 -0
- package/module/es5/Error/index.d.ts +1 -0
- package/module/es5/Error/index.js +11 -0
- package/module/es5/Error/retry.d.ts +37 -0
- package/module/es5/Error/retry.js +88 -0
- package/module/es5/IP/getIpClass.js +1 -1
- package/module/es5/IP/getNetworkAddress.js +2 -2
- package/module/es5/IP/ipToBinaryString.js +2 -2
- package/module/es5/IP/subnetMaskToCidr.js +1 -1
- package/module/es5/Math/calculator/core.js +17 -9
- package/module/es5/Math/calculator/literalExpression.js +19 -6
- package/module/es5/Math/correlationCoefficient.d.ts +11 -0
- package/module/es5/Math/correlationCoefficient.js +63 -0
- package/module/es5/Math/division.js +3 -3
- package/module/es5/Math/gcd.js +43 -5
- package/module/es5/Math/index.d.ts +3 -0
- package/module/es5/Math/index.js +33 -0
- package/module/es5/Math/mode.d.ts +10 -0
- package/module/es5/Math/mode.js +67 -0
- package/module/es5/Math/percentile.d.ts +11 -0
- package/module/es5/Math/percentile.js +42 -0
- package/module/es5/Math/standardDeviation.js +4 -2
- package/module/es5/Object/has.js +1 -1
- package/module/es5/Object/index.d.ts +4 -0
- package/module/es5/Object/index.js +44 -0
- package/module/es5/Object/isEmpty.d.ts +6 -0
- package/module/es5/Object/isEmpty.js +26 -0
- package/module/es5/Object/merge.d.ts +8 -0
- package/module/es5/Object/merge.js +18 -0
- package/module/es5/Object/mergeDeep.d.ts +8 -0
- package/module/es5/Object/mergeDeep.js +46 -0
- package/module/es5/Object/omit.d.ts +7 -0
- package/module/es5/Object/omit.js +29 -0
- package/module/es5/Object/pickDeep.d.ts +2 -2
- package/module/es5/Object/pickDeep.js +4 -4
- package/module/es5/Simple/Date/dayOfWeekSimple.js +3 -3
- package/module/es5/String/camelCase.d.ts +6 -0
- package/module/es5/String/camelCase.js +18 -0
- package/module/es5/String/escapeHtml.d.ts +6 -0
- package/module/es5/String/escapeHtml.js +27 -0
- package/module/es5/String/formatString/applyFormatter.d.ts +25 -0
- package/module/es5/String/formatString/applyFormatter.js +100 -0
- package/module/es5/String/formatString/defaultFormatters.d.ts +24 -0
- package/module/es5/String/formatString/defaultFormatters.js +79 -0
- package/module/es5/String/formatString/detectMode.d.ts +26 -0
- package/module/es5/String/formatString/detectMode.js +60 -0
- package/module/es5/String/formatString/getValue.d.ts +27 -0
- package/module/es5/String/formatString/getValue.js +85 -0
- package/module/es5/String/formatString/index.d.ts +91 -0
- package/module/es5/String/formatString/index.js +152 -0
- package/module/es5/String/fuzzySearch.d.ts +14 -0
- package/module/es5/String/fuzzySearch.js +50 -0
- package/module/es5/String/index.d.ts +9 -0
- package/module/es5/String/index.js +99 -0
- package/module/es5/String/kebabCase.d.ts +6 -0
- package/module/es5/String/kebabCase.js +26 -0
- package/module/es5/String/levenshteinDistance.d.ts +8 -0
- package/module/es5/String/levenshteinDistance.js +58 -0
- package/module/es5/String/slugify.d.ts +10 -0
- package/module/es5/String/slugify.js +18 -0
- package/module/es5/String/stringSimilarity.d.ts +8 -0
- package/module/es5/String/stringSimilarity.js +30 -0
- package/module/es5/String/truncate.d.ts +12 -0
- package/module/es5/String/truncate.js +27 -0
- package/module/es5/String/unescapeHtml.d.ts +17 -0
- package/module/es5/String/unescapeHtml.js +51 -0
- package/module/es5/Validate/core/index.js +0 -1
- package/module/es5/Validate/index.d.ts +1 -0
- package/module/es5/Validate/index.js +11 -0
- package/module/es5/Validate/isDeepEqual.d.ts +28 -0
- package/module/es5/Validate/isDeepEqual.js +232 -0
- package/module/es5/Validate/isDouble.js +1 -1
- package/module/es5/Validate/isNode.js +1 -0
- package/module/es5/Validate/isNumber.js +1 -1
- package/module/es5/Validate/isValueNaN.js +1 -1
- package/module/es5/Validate/number/even.js +4 -0
- package/module/es5/Validate/number/odd.js +4 -0
- package/module/es5/Validate/string/email.js +26 -1
- package/module/es5/index.d.ts +2 -0
- package/module/es5/index.js +22 -0
- package/module/es5/tsconfig.tsbuildinfo +1 -1
- package/module/es5/types/index.d.ts +1 -0
- package/module/es5/types/index.js +11 -0
- package/module/es5/types/logic/deepPartial.d.ts +37 -0
- package/module/es5/types/logic/deepPartial.js +5 -0
- package/module/es5/types/logic/deepRequired.d.ts +37 -0
- package/module/es5/types/logic/deepRequired.js +5 -0
- package/module/es5/types/logic/index.d.ts +3 -0
- package/module/es5/types/logic/index.js +33 -0
- package/module/es5/types/logic/unionToIntersection.d.ts +12 -0
- package/module/es5/types/logic/unionToIntersection.js +5 -0
- package/module/es5/types/object/index.d.ts +1 -0
- package/module/es5/types/object/index.js +11 -0
- package/module/es5/types/object/pickDeep.d.ts +13 -1
- package/module/es5/types/object/shallowObjectValue.d.ts +9 -0
- package/module/es5/types/object/shallowObjectValue.js +5 -0
- package/module/es5/types/string/formatString/formatData.d.ts +17 -0
- package/module/es5/types/string/formatString/formatData.js +5 -0
- package/module/es5/types/string/formatString/formatOptions.d.ts +21 -0
- package/module/es5/types/string/formatString/formatOptions.js +5 -0
- package/module/es5/types/string/formatString/formatString.d.ts +4 -0
- package/module/es5/types/string/formatString/formatString.js +49 -0
- package/module/es5/types/string/formatString/formatValue.d.ts +15 -0
- package/module/es5/types/string/formatString/formatValue.js +5 -0
- package/module/es5/types/string/formatString/formatter.d.ts +13 -0
- package/module/es5/types/string/formatString/formatter.js +5 -0
- package/module/es5/types/string/formatString/index.d.ts +5 -0
- package/module/es5/types/string/formatString/index.js +60 -0
- package/module/es5/types/string/index.d.ts +1 -0
- package/module/es5/types/string/index.js +16 -0
- package/module/index.d.ts +2 -0
- package/module/index.js +2 -0
- package/module/index.js.map +1 -1
- package/module/types/index.d.ts +1 -0
- package/module/types/index.js +1 -0
- package/module/types/index.js.map +1 -1
- package/module/types/logic/deepPartial.d.ts +37 -0
- package/module/types/logic/deepPartial.js +36 -0
- package/module/types/logic/deepPartial.js.map +1 -0
- package/module/types/logic/deepRequired.d.ts +37 -0
- package/module/types/logic/deepRequired.js +2 -0
- package/module/types/logic/deepRequired.js.map +1 -0
- package/module/types/logic/index.d.ts +3 -0
- package/module/types/logic/index.js +3 -0
- package/module/types/logic/index.js.map +1 -1
- package/module/types/logic/unionToIntersection.d.ts +12 -0
- package/module/types/logic/unionToIntersection.js +2 -0
- package/module/types/logic/unionToIntersection.js.map +1 -0
- package/module/types/object/index.d.ts +1 -0
- package/module/types/object/index.js +1 -0
- package/module/types/object/index.js.map +1 -1
- package/module/types/object/pickDeep.d.ts +13 -1
- package/module/types/object/shallowObjectValue.d.ts +9 -0
- package/module/types/object/shallowObjectValue.js +2 -0
- package/module/types/object/shallowObjectValue.js.map +1 -0
- package/module/types/string/formatString/formatData.d.ts +17 -0
- package/module/types/string/formatString/formatData.js +2 -0
- package/module/types/string/formatString/formatData.js.map +1 -0
- package/module/types/string/formatString/formatOptions.d.ts +21 -0
- package/module/types/string/formatString/formatOptions.js +2 -0
- package/module/types/string/formatString/formatOptions.js.map +1 -0
- package/module/types/string/formatString/formatString.d.ts +4 -0
- package/module/types/string/formatString/formatString.js +5 -0
- package/module/types/string/formatString/formatString.js.map +1 -0
- package/module/types/string/formatString/formatValue.d.ts +15 -0
- package/module/types/string/formatString/formatValue.js +2 -0
- package/module/types/string/formatString/formatValue.js.map +1 -0
- package/module/types/string/formatString/formatter.d.ts +13 -0
- package/module/types/string/formatString/formatter.js +2 -0
- package/module/types/string/formatString/formatter.js.map +1 -0
- package/module/types/string/formatString/index.d.ts +5 -0
- package/module/types/string/formatString/index.js +6 -0
- package/module/types/string/formatString/index.js.map +1 -0
- package/module/types/string/index.d.ts +1 -0
- package/module/types/string/index.js +2 -0
- package/module/types/string/index.js.map +1 -0
- package/package.json +40 -41
- package/module/String/formatString.d.ts +0 -13
- package/module/String/formatString.js +0 -18
- package/module/String/formatString.js.map +0 -1
- package/module/es5/String/formatString.d.ts +0 -13
- package/module/es5/String/formatString.js +0 -26
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _camelCase = require("./camelCase");
|
|
7
|
+
Object.keys(_camelCase).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _camelCase[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _camelCase[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _deleteSpaces = require("./deleteSpaces");
|
|
7
18
|
Object.keys(_deleteSpaces).forEach(function (key) {
|
|
8
19
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -14,6 +25,17 @@ Object.keys(_deleteSpaces).forEach(function (key) {
|
|
|
14
25
|
}
|
|
15
26
|
});
|
|
16
27
|
});
|
|
28
|
+
var _escapeHtml = require("./escapeHtml");
|
|
29
|
+
Object.keys(_escapeHtml).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _escapeHtml[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _escapeHtml[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
17
39
|
var _formatString = require("./formatString");
|
|
18
40
|
Object.keys(_formatString).forEach(function (key) {
|
|
19
41
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -36,6 +58,17 @@ Object.keys(_fromBase).forEach(function (key) {
|
|
|
36
58
|
}
|
|
37
59
|
});
|
|
38
60
|
});
|
|
61
|
+
var _fuzzySearch = require("./fuzzySearch");
|
|
62
|
+
Object.keys(_fuzzySearch).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _fuzzySearch[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function get() {
|
|
68
|
+
return _fuzzySearch[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
39
72
|
var _hasNoLetters = require("./hasNoLetters");
|
|
40
73
|
Object.keys(_hasNoLetters).forEach(function (key) {
|
|
41
74
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -47,6 +80,28 @@ Object.keys(_hasNoLetters).forEach(function (key) {
|
|
|
47
80
|
}
|
|
48
81
|
});
|
|
49
82
|
});
|
|
83
|
+
var _kebabCase = require("./kebabCase");
|
|
84
|
+
Object.keys(_kebabCase).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _kebabCase[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function get() {
|
|
90
|
+
return _kebabCase[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
var _levenshteinDistance = require("./levenshteinDistance");
|
|
95
|
+
Object.keys(_levenshteinDistance).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _levenshteinDistance[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _levenshteinDistance[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
50
105
|
var _padEnd = require("./padEnd");
|
|
51
106
|
Object.keys(_padEnd).forEach(function (key) {
|
|
52
107
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -102,6 +157,28 @@ Object.keys(_reverseString).forEach(function (key) {
|
|
|
102
157
|
}
|
|
103
158
|
});
|
|
104
159
|
});
|
|
160
|
+
var _slugify = require("./slugify");
|
|
161
|
+
Object.keys(_slugify).forEach(function (key) {
|
|
162
|
+
if (key === "default" || key === "__esModule") return;
|
|
163
|
+
if (key in exports && exports[key] === _slugify[key]) return;
|
|
164
|
+
Object.defineProperty(exports, key, {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function get() {
|
|
167
|
+
return _slugify[key];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
var _stringSimilarity = require("./stringSimilarity");
|
|
172
|
+
Object.keys(_stringSimilarity).forEach(function (key) {
|
|
173
|
+
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (key in exports && exports[key] === _stringSimilarity[key]) return;
|
|
175
|
+
Object.defineProperty(exports, key, {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function get() {
|
|
178
|
+
return _stringSimilarity[key];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
105
182
|
var _toBase = require("./toBase64");
|
|
106
183
|
Object.keys(_toBase).forEach(function (key) {
|
|
107
184
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -156,4 +233,26 @@ Object.keys(_trimStartCharacters).forEach(function (key) {
|
|
|
156
233
|
return _trimStartCharacters[key];
|
|
157
234
|
}
|
|
158
235
|
});
|
|
236
|
+
});
|
|
237
|
+
var _truncate = require("./truncate");
|
|
238
|
+
Object.keys(_truncate).forEach(function (key) {
|
|
239
|
+
if (key === "default" || key === "__esModule") return;
|
|
240
|
+
if (key in exports && exports[key] === _truncate[key]) return;
|
|
241
|
+
Object.defineProperty(exports, key, {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function get() {
|
|
244
|
+
return _truncate[key];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
var _unescapeHtml = require("./unescapeHtml");
|
|
249
|
+
Object.keys(_unescapeHtml).forEach(function (key) {
|
|
250
|
+
if (key === "default" || key === "__esModule") return;
|
|
251
|
+
if (key in exports && exports[key] === _unescapeHtml[key]) return;
|
|
252
|
+
Object.defineProperty(exports, key, {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function get() {
|
|
255
|
+
return _unescapeHtml[key];
|
|
256
|
+
}
|
|
257
|
+
});
|
|
159
258
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.kebabCase = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Converts a string to kebab-case
|
|
9
|
+
* @param str - The string to convert
|
|
10
|
+
* @returns The kebab-case string
|
|
11
|
+
*/
|
|
12
|
+
var kebabCase = exports.kebabCase = function kebabCase(string_) {
|
|
13
|
+
return string_
|
|
14
|
+
// Insert dash between lowercase and uppercase
|
|
15
|
+
.replaceAll(/([a-z])([A-Z])/g, "$1-$2")
|
|
16
|
+
// Insert dash between sequences of uppercase letters and following lowercase
|
|
17
|
+
.replaceAll(/([A-Z])([A-Z][a-z])/g, "$1-$2")
|
|
18
|
+
// Replace spaces and underscores with dashes
|
|
19
|
+
.replaceAll(/[\s_]+/g, "-")
|
|
20
|
+
// Remove special characters except alphanumeric and dashes
|
|
21
|
+
.replaceAll(/[^a-zA-Z0-9-]/g, "-")
|
|
22
|
+
// Remove multiple consecutive dashes
|
|
23
|
+
.replaceAll(/-+/g, "-")
|
|
24
|
+
// Remove leading and trailing dashes
|
|
25
|
+
.replaceAll(/^-|-$/g, "").toLowerCase();
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the Levenshtein distance between two strings
|
|
3
|
+
* Returns the minimum number of single-character edits (insertions, deletions, or substitutions)
|
|
4
|
+
* @param str1 - First string to compare
|
|
5
|
+
* @param str2 - Second string to compare
|
|
6
|
+
* @returns The Levenshtein distance
|
|
7
|
+
*/
|
|
8
|
+
export declare const levenshteinDistance: (string1: string, string2: string) => number;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.levenshteinDistance = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Calculates the Levenshtein distance between two strings
|
|
9
|
+
* Returns the minimum number of single-character edits (insertions, deletions, or substitutions)
|
|
10
|
+
* @param str1 - First string to compare
|
|
11
|
+
* @param str2 - Second string to compare
|
|
12
|
+
* @returns The Levenshtein distance
|
|
13
|
+
*/
|
|
14
|
+
var levenshteinDistance = exports.levenshteinDistance = function levenshteinDistance(string1, string2) {
|
|
15
|
+
var length1 = string1.length;
|
|
16
|
+
var length2 = string2.length;
|
|
17
|
+
|
|
18
|
+
// Return the length of the other string if one is empty
|
|
19
|
+
if (length1 === 0) {
|
|
20
|
+
return length2;
|
|
21
|
+
}
|
|
22
|
+
if (length2 === 0) {
|
|
23
|
+
return length1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Create a 2D array for dynamic programming
|
|
27
|
+
var matrix = Array.from({
|
|
28
|
+
length: length1 + 1
|
|
29
|
+
}, function () {
|
|
30
|
+
return Array.from({
|
|
31
|
+
length: length2 + 1
|
|
32
|
+
}, function () {
|
|
33
|
+
return 0;
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Initialize first column and row
|
|
38
|
+
for (var index = 0; index <= length1; index++) {
|
|
39
|
+
matrix[index][0] = index;
|
|
40
|
+
}
|
|
41
|
+
for (var _index = 0; _index <= length2; _index++) {
|
|
42
|
+
matrix[0][_index] = _index;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Calculate distances
|
|
46
|
+
for (var _index2 = 1; _index2 <= length1; _index2++) {
|
|
47
|
+
for (var index_ = 1; index_ <= length2; index_++) {
|
|
48
|
+
var cost = string1[_index2 - 1] === string2[index_ - 1] ? 0 : 1;
|
|
49
|
+
matrix[_index2][index_] = Math.min(matrix[_index2 - 1][index_] + 1,
|
|
50
|
+
// deletion
|
|
51
|
+
matrix[_index2][index_ - 1] + 1,
|
|
52
|
+
// insertion
|
|
53
|
+
matrix[_index2 - 1][index_ - 1] + cost // substitution
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return matrix[length1][length2];
|
|
58
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a string to a URL-friendly slug
|
|
3
|
+
* @param str - The string to convert
|
|
4
|
+
* @returns The slugified string
|
|
5
|
+
* @example
|
|
6
|
+
* slugify("Hello World!"); // "hello-world"
|
|
7
|
+
* slugify("This is a Test"); // "this-is-a-test"
|
|
8
|
+
* slugify("Japanese: こんにちは"); // "japanese"
|
|
9
|
+
*/
|
|
10
|
+
export declare const slugify: (string_: string) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.slugify = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Convert a string to a URL-friendly slug
|
|
9
|
+
* @param str - The string to convert
|
|
10
|
+
* @returns The slugified string
|
|
11
|
+
* @example
|
|
12
|
+
* slugify("Hello World!"); // "hello-world"
|
|
13
|
+
* slugify("This is a Test"); // "this-is-a-test"
|
|
14
|
+
* slugify("Japanese: こんにちは"); // "japanese"
|
|
15
|
+
*/
|
|
16
|
+
var slugify = exports.slugify = function slugify(string_) {
|
|
17
|
+
return string_.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").toLowerCase().replaceAll(/[^\w\s-]/g, "-").replaceAll(/\s+/g, "-").replaceAll(/_+/g, "-").replaceAll(/-+/g, "-").replaceAll(/^-+|-+$/g, "");
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the similarity between two strings as a percentage
|
|
3
|
+
* Uses Levenshtein distance normalized by the length of the longer string
|
|
4
|
+
* @param str1 - First string to compare
|
|
5
|
+
* @param str2 - Second string to compare
|
|
6
|
+
* @returns Similarity score between 0 (completely different) and 1 (identical)
|
|
7
|
+
*/
|
|
8
|
+
export declare const stringSimilarity: (string1: string, string2: string) => number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.stringSimilarity = void 0;
|
|
7
|
+
var _levenshteinDistance = require("./levenshteinDistance");
|
|
8
|
+
/**
|
|
9
|
+
* Calculates the similarity between two strings as a percentage
|
|
10
|
+
* Uses Levenshtein distance normalized by the length of the longer string
|
|
11
|
+
* @param str1 - First string to compare
|
|
12
|
+
* @param str2 - Second string to compare
|
|
13
|
+
* @returns Similarity score between 0 (completely different) and 1 (identical)
|
|
14
|
+
*/
|
|
15
|
+
var stringSimilarity = exports.stringSimilarity = function stringSimilarity(string1, string2) {
|
|
16
|
+
// Identical strings have 100% similarity
|
|
17
|
+
if (string1 === string2) {
|
|
18
|
+
return 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Empty strings handling
|
|
22
|
+
if (string1.length === 0 || string2.length === 0) {
|
|
23
|
+
return 0;
|
|
24
|
+
}
|
|
25
|
+
var distance = (0, _levenshteinDistance.levenshteinDistance)(string1, string2);
|
|
26
|
+
var maxLength = Math.max(string1.length, string2.length);
|
|
27
|
+
|
|
28
|
+
// Calculate similarity as 1 - (distance / maxLength)
|
|
29
|
+
return 1 - distance / maxLength;
|
|
30
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Truncate a string to a specified length
|
|
3
|
+
* @param str - The string to truncate
|
|
4
|
+
* @param length - The maximum length
|
|
5
|
+
* @param suffix - The suffix to add when truncating (default: "...")
|
|
6
|
+
* @returns The truncated string
|
|
7
|
+
* @example
|
|
8
|
+
* truncate("Hello World", 5); // "Hello..."
|
|
9
|
+
* truncate("Hello World", 5, "~"); // "Hello~"
|
|
10
|
+
* truncate("Hello", 10); // "Hello"
|
|
11
|
+
*/
|
|
12
|
+
export declare const truncate: (string_: string, length: number, suffix?: string) => string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.truncate = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Truncate a string to a specified length
|
|
9
|
+
* @param str - The string to truncate
|
|
10
|
+
* @param length - The maximum length
|
|
11
|
+
* @param suffix - The suffix to add when truncating (default: "...")
|
|
12
|
+
* @returns The truncated string
|
|
13
|
+
* @example
|
|
14
|
+
* truncate("Hello World", 5); // "Hello..."
|
|
15
|
+
* truncate("Hello World", 5, "~"); // "Hello~"
|
|
16
|
+
* truncate("Hello", 10); // "Hello"
|
|
17
|
+
*/
|
|
18
|
+
var truncate = exports.truncate = function truncate(string_, length) {
|
|
19
|
+
var suffix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "...";
|
|
20
|
+
if (length < 0) {
|
|
21
|
+
throw new Error("Length must be non-negative");
|
|
22
|
+
}
|
|
23
|
+
if (string_.length <= length) {
|
|
24
|
+
return string_;
|
|
25
|
+
}
|
|
26
|
+
return string_.slice(0, length) + suffix;
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unescapes HTML entities in a string
|
|
3
|
+
* @param string_ - The string to unescape
|
|
4
|
+
* @returns The unescaped string with HTML entities converted back to their original characters
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* unescapeHtml("<script>alert("Hello");</script>");
|
|
8
|
+
* // Returns: "<script>alert("Hello");</script>"
|
|
9
|
+
*
|
|
10
|
+
* unescapeHtml("Tom & Jerry");
|
|
11
|
+
* // Returns: "Tom & Jerry"
|
|
12
|
+
*
|
|
13
|
+
* unescapeHtml("5 < 10 && 10 > 5");
|
|
14
|
+
* // Returns: "5 < 10 && 10 > 5"
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const unescapeHtml: (string_: string) => string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.unescapeHtml = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* HTML entities map for unescaping
|
|
9
|
+
*/
|
|
10
|
+
var htmlUnescapeMap = {
|
|
11
|
+
"&": "&",
|
|
12
|
+
"<": "<",
|
|
13
|
+
">": ">",
|
|
14
|
+
""": '"',
|
|
15
|
+
"'": "'",
|
|
16
|
+
"'": "'",
|
|
17
|
+
"/": "/",
|
|
18
|
+
"`": "`",
|
|
19
|
+
"=": "="
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Unescapes HTML entities in a string
|
|
24
|
+
* @param string_ - The string to unescape
|
|
25
|
+
* @returns The unescaped string with HTML entities converted back to their original characters
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* unescapeHtml("<script>alert("Hello");</script>");
|
|
29
|
+
* // Returns: "<script>alert("Hello");</script>"
|
|
30
|
+
*
|
|
31
|
+
* unescapeHtml("Tom & Jerry");
|
|
32
|
+
* // Returns: "Tom & Jerry"
|
|
33
|
+
*
|
|
34
|
+
* unescapeHtml("5 < 10 && 10 > 5");
|
|
35
|
+
* // Returns: "5 < 10 && 10 > 5"
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
var unescapeHtml = exports.unescapeHtml = function unescapeHtml(string_) {
|
|
39
|
+
var entityRegex = /&(?:amp|lt|gt|quot|#39|#x27|#x2F|#x60|#x3D);|&#(\d*);|&#x([0-9a-fA-F]*);/g;
|
|
40
|
+
return string_.replaceAll(entityRegex, function (match, dec, hex) {
|
|
41
|
+
if (dec !== undefined) {
|
|
42
|
+
var codePoint = Number.parseInt(dec, 10);
|
|
43
|
+
return Number.isNaN(codePoint) ? match : String.fromCodePoint(codePoint);
|
|
44
|
+
}
|
|
45
|
+
if (hex !== undefined) {
|
|
46
|
+
var _codePoint = Number.parseInt(hex, 16);
|
|
47
|
+
return Number.isNaN(_codePoint) ? match : String.fromCodePoint(_codePoint);
|
|
48
|
+
}
|
|
49
|
+
return htmlUnescapeMap[match];
|
|
50
|
+
});
|
|
51
|
+
};
|
|
@@ -24,7 +24,6 @@ var core = exports.core = function core(type) {
|
|
|
24
24
|
return function (value) {
|
|
25
25
|
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
26
26
|
var message = arguments.length > 2 ? arguments[2] : undefined;
|
|
27
|
-
// biome-ignore lint/suspicious/useValidTypeof: Type parameter is a string literal type from Types<T>
|
|
28
27
|
if (_typeof(value) !== type) {
|
|
29
28
|
return {
|
|
30
29
|
validate: false,
|
|
@@ -58,6 +58,17 @@ Object.keys(_string).forEach(function (key) {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
|
+
var _isDeepEqual = require("./isDeepEqual");
|
|
62
|
+
Object.keys(_isDeepEqual).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _isDeepEqual[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function get() {
|
|
68
|
+
return _isDeepEqual[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
61
72
|
var _isArray = require("./isArray");
|
|
62
73
|
Object.keys(_isArray).forEach(function (key) {
|
|
63
74
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for isDeepEqual comparison
|
|
3
|
+
*/
|
|
4
|
+
export interface IsDeepEqualOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Whether to ignore array order when comparing arrays
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
strictOrder?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Performs a deep equality comparison between two values
|
|
13
|
+
*
|
|
14
|
+
* @param a - First value to compare
|
|
15
|
+
* @param b - Second value to compare
|
|
16
|
+
* @param options - Comparison options
|
|
17
|
+
* @returns true if values are deeply equal, false otherwise
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* isDeepEqual({ a: 1, b: [2, 3] }, { b: [2, 3], a: 1 }); // true
|
|
22
|
+
* isDeepEqual([1, 2, 3], [3, 2, 1]); // false
|
|
23
|
+
* isDeepEqual([1, 2, 3], [3, 2, 1], { strictOrder: false }); // true
|
|
24
|
+
* isDeepEqual(new Set([1, 2]), new Set([2, 1])); // true
|
|
25
|
+
* isDeepEqual(new Map([['a', 1]]), new Map([['a', 1]])); // true
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function isDeepEqual(a: unknown, b: unknown, options?: IsDeepEqualOptions): boolean;
|