toolbox-x 2.2.5 → 2.4.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/CHANGELOG.md +18 -0
- package/dist/{guards-Dc9MB9on.mjs → basics-B7Sqf33u.mjs} +233 -233
- package/dist/{guards-BSwFQX1M.cjs → basics-Cif013VV.cjs} +233 -233
- package/dist/{colors.cjs → colors/index.cjs} +6 -6
- package/dist/{colors.d.mts → colors/index.d.cts} +2 -2
- package/dist/{colors.d.cts → colors/index.d.mts} +2 -2
- package/dist/{colors.mjs → colors/index.mjs} +6 -6
- package/dist/constants.cjs +13 -13
- package/dist/constants.mjs +3 -3
- package/dist/{converter.cjs → converter/index.cjs} +1 -1
- package/dist/{converter.d.cts → converter/index.d.cts} +2 -2
- package/dist/{converter.d.mts → converter/index.d.mts} +2 -2
- package/dist/{converter.mjs → converter/index.mjs} +1 -1
- package/dist/{date.cjs → date/index.cjs} +7 -7
- package/dist/{date.d.cts → date/index.d.cts} +1 -1
- package/dist/{date.d.mts → date/index.d.mts} +1 -1
- package/dist/{date.mjs → date/index.mjs} +7 -7
- package/dist/{dom.cjs → dom/index.cjs} +8 -8
- package/dist/{dom.d.cts → dom/index.d.cts} +3 -3
- package/dist/{dom.d.mts → dom/index.d.mts} +3 -3
- package/dist/{dom.mjs → dom/index.mjs} +5 -5
- package/dist/{guards.cjs → guards/index.cjs} +38 -38
- package/dist/{guards.d.mts → guards/index.d.cts} +4 -4
- package/dist/{guards.d.cts → guards/index.d.mts} +4 -4
- package/dist/{guards.mjs → guards/index.mjs} +6 -6
- package/dist/{guards-CqbVT4L5.cjs → guards-BD2Fkugj.cjs} +2 -2
- package/dist/{guards-DKGBsd6x.mjs → guards-DBunDnng.mjs} +2 -2
- package/dist/{hash.cjs → hash/index.cjs} +69 -66
- package/dist/{hash.d.cts → hash/index.d.cts} +77 -5
- package/dist/{hash.d.mts → hash/index.d.mts} +77 -5
- package/dist/{hash.mjs → hash/index.mjs} +5 -5
- package/dist/{http-status.cjs → http-status/index.cjs} +1 -1
- package/dist/{http-status.d.mts → http-status/index.d.cts} +2 -2
- package/dist/{http-status.d.cts → http-status/index.d.mts} +2 -2
- package/dist/{http-status.mjs → http-status/index.mjs} +1 -1
- package/dist/index.cjs +157 -87
- package/dist/index.d.cts +46 -1
- package/dist/index.d.mts +46 -1
- package/dist/index.mjs +74 -8
- package/dist/{parse-TuFyLeVH.mjs → parse-CILDG7TG.mjs} +3 -3
- package/dist/{parse-jh637S25.cjs → parse-CffWYCuy.cjs} +3 -3
- package/dist/{query-sWSi-d7u.cjs → query-Blm7AiEZ.cjs} +9 -9
- package/dist/{query-BomnyWh3.mjs → query-PGFEup3p.mjs} +2 -2
- package/dist/{stylog.cjs → stylog/index.cjs} +5 -5
- package/dist/{stylog.d.cts → stylog/index.d.cts} +2 -2
- package/dist/{stylog.d.mts → stylog/index.d.mts} +2 -2
- package/dist/{stylog.mjs → stylog/index.mjs} +5 -5
- package/dist/types/pluralizer.d.cts +25 -1
- package/dist/types/pluralizer.d.mts +25 -1
- package/dist/{utilities-BSv8VbnM.mjs → utilities-CmPwOkdy.mjs} +1 -1
- package/dist/{utilities-BVpk3LKy.cjs → utilities-_COSGq1U.cjs} +1 -1
- package/dist/{basics-20lm69yy.mjs → utils-BO5CcsjK.mjs} +631 -548
- package/dist/{basics-byj0VH1c.cjs → utils-DR9g0Sef.cjs} +580 -479
- package/dist/{verbalizer.cjs → verbalizer/index.cjs} +1 -1
- package/dist/{verbalizer.mjs → verbalizer/index.mjs} +1 -1
- package/package.json +19 -23
- package/dist/pluralizer-DXMuPUAK.d.mts +0 -42
- package/dist/pluralizer-DYsDqq9c.d.cts +0 -42
- package/dist/pluralizer.cjs +0 -678
- package/dist/pluralizer.d.cts +0 -152
- package/dist/pluralizer.d.mts +0 -152
- package/dist/pluralizer.mjs +0 -676
- /package/dist/{verbalizer.d.cts → verbalizer/index.d.cts} +0 -0
- /package/dist/{verbalizer.d.mts → verbalizer/index.d.mts} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
18
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
19
19
|
const require_case = require('./case-Bd7QLHYw.cjs');
|
|
20
|
-
const require_specials = require('./specials-DU8u108m.cjs');
|
|
21
20
|
const require_constants = require('./constants-B3nc8psr.cjs');
|
|
22
|
-
const require_utilities = require('./utilities-BVpk3LKy.cjs');
|
|
23
21
|
const require_countries = require('./countries-C0x58zVg.cjs');
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
22
|
+
const require_utils = require('./utils-DR9g0Sef.cjs');
|
|
23
|
+
const require_specials = require('./specials-DU8u108m.cjs');
|
|
24
|
+
const require_basics = require('./basics-Cif013VV.cjs');
|
|
25
|
+
const require_utilities = require('./utilities-_COSGq1U.cjs');
|
|
26
|
+
const require_query = require('./query-Blm7AiEZ.cjs');
|
|
27
27
|
|
|
28
28
|
//#region src/string/anagram.ts
|
|
29
29
|
/** `WeakMap` to cache user provided dictionary array */
|
|
@@ -577,8 +577,8 @@ function getAverage(...numbers) {
|
|
|
577
577
|
let sum = 0;
|
|
578
578
|
let count = 0;
|
|
579
579
|
for (const n of numbers) {
|
|
580
|
-
const num =
|
|
581
|
-
if (require_primitives.
|
|
580
|
+
const num = require_utilities.normalizeNumber(n);
|
|
581
|
+
if (!require_primitives.isUndefined(num)) {
|
|
582
582
|
sum += num;
|
|
583
583
|
count++;
|
|
584
584
|
}
|
|
@@ -586,6 +586,72 @@ function getAverage(...numbers) {
|
|
|
586
586
|
return count === 0 ? NaN : Math.round(sum / count * 1e3) / 1e3;
|
|
587
587
|
}
|
|
588
588
|
/**
|
|
589
|
+
* * Returns the number of decimal places represented by a number.
|
|
590
|
+
*
|
|
591
|
+
* @param value - The number or numeric string for which to calculate the number of decimal places.
|
|
592
|
+
* @returns The number of decimal places.
|
|
593
|
+
*
|
|
594
|
+
* @throws - {@link TypeError} - If the input value cannot be converted to a number, e.g. `undefined`, `null`, `NaN`, `'11x'` etc..
|
|
595
|
+
*
|
|
596
|
+
* @remarks
|
|
597
|
+
* - If a numeric string in scientific notation (e.g., '1e-6') is provided, it will calculate the decimal places accordingly.
|
|
598
|
+
* - If a numeric string has trailing zeros (e.g., ''1.00'' or `'9.900'`),
|
|
599
|
+
* it will convert them as: `'1.00'` -> `1`, `'9.900'` -> `9.9` and return `0` and `1` respectively.
|
|
600
|
+
* - If a number is an integer, it will return `0`.
|
|
601
|
+
* - Internally uses {@link normalizeNumber} to normalize the input value.
|
|
602
|
+
*
|
|
603
|
+
* @example
|
|
604
|
+
* getDecimalPlaces(123.456); // 3
|
|
605
|
+
* getDecimalPlaces('123.45600'); // 3
|
|
606
|
+
* getDecimalPlaces(123); // 0
|
|
607
|
+
* getDecimalPlaces('1e-6'); // 6
|
|
608
|
+
* getDecimalPlaces('1.00'); // 0
|
|
609
|
+
* getDecimalPlaces('9.900'); // 1
|
|
610
|
+
*/
|
|
611
|
+
function getDecimalPlaces(value) {
|
|
612
|
+
const number = require_utilities.normalizeNumber(value);
|
|
613
|
+
if (require_primitives.isUndefined(number)) throw new TypeError(`Invalid numeric representation: ${value}`);
|
|
614
|
+
const str = String(number);
|
|
615
|
+
if (str.includes("e-")) {
|
|
616
|
+
const [, exponent] = str.split("e-");
|
|
617
|
+
return Number(exponent);
|
|
618
|
+
}
|
|
619
|
+
const [, decimal = ""] = str.split(".");
|
|
620
|
+
return decimal.length;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* * Adds numbers safely, avoiding floating-point arithmetic issues.
|
|
624
|
+
*
|
|
625
|
+
* @param values - A list of numbers or numeric strings to add.
|
|
626
|
+
* @returns The sum of the provided numbers, with floating-point inaccuracies mitigated.
|
|
627
|
+
*
|
|
628
|
+
* @remarks
|
|
629
|
+
* - This function addresses common floating-point addition errors (e.g., `0.1 + 0.2 !== 0.3`)
|
|
630
|
+
* by temporarily scaling numbers to integers, performing the addition, and then scaling back.
|
|
631
|
+
* - Non-numeric values are safely ignored in the runtime.
|
|
632
|
+
* - Rounding is used to mitigate floating-point inaccuracies.
|
|
633
|
+
* - Intended for use cases where floating-point inaccuracies are a concern.
|
|
634
|
+
* - Internally uses {@link normalizeNumber}, {@link getDecimalPlaces}, {@link roundNumber}.
|
|
635
|
+
* - It does not handle numbers beyond {@link Number.MAX_SAFE_INTEGER} or {@link Number.MIN_SAFE_INTEGER}.
|
|
636
|
+
* May output incorrect results if the numbers are too large.
|
|
637
|
+
* @example
|
|
638
|
+
* safeAdd(0.1, 0.2); // → 0.3 (correctly handles floating-point error)
|
|
639
|
+
* safeAdd(1, '2', 3.456); // → 6.456
|
|
640
|
+
* safeAdd(0.1, 0.2, 0.3, 0.4); // → 1.0 (accurate sum)
|
|
641
|
+
*/
|
|
642
|
+
function safeAdd(...values) {
|
|
643
|
+
let scale = 1;
|
|
644
|
+
const nums = [];
|
|
645
|
+
for (const value of values) {
|
|
646
|
+
const num = require_utilities.normalizeNumber(value);
|
|
647
|
+
if (!require_primitives.isUndefined(num)) {
|
|
648
|
+
nums.push(num);
|
|
649
|
+
scale = Math.max(scale, 10 ** getDecimalPlaces(num));
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
return nums.reduce((total, value) => total + roundNumber(value * scale, 0), 0) / scale;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
589
655
|
* * Rounds a number to a specified number of decimal places.
|
|
590
656
|
*
|
|
591
657
|
* @param number - The number to round.
|
|
@@ -1126,39 +1192,39 @@ function calculatePercentage(options) {
|
|
|
1126
1192
|
switch (options?.mode) {
|
|
1127
1193
|
case "get-percent": {
|
|
1128
1194
|
const { part, total } = options;
|
|
1129
|
-
if (
|
|
1195
|
+
if (require_basics.areInvalidNumbers(part, total) || total === 0) return NaN;
|
|
1130
1196
|
return _roundNumber(part / total * 100);
|
|
1131
1197
|
}
|
|
1132
1198
|
case "get-value": {
|
|
1133
1199
|
const { percentage, total } = options;
|
|
1134
|
-
if (
|
|
1200
|
+
if (require_basics.areInvalidNumbers(percentage, total) || total === 0) return NaN;
|
|
1135
1201
|
return _roundNumber(percentage / 100 * total);
|
|
1136
1202
|
}
|
|
1137
1203
|
case "get-original": {
|
|
1138
1204
|
const { percentage, value } = options;
|
|
1139
|
-
if (
|
|
1205
|
+
if (require_basics.areInvalidNumbers(percentage, value) || percentage === 0) return NaN;
|
|
1140
1206
|
return _roundNumber(value / percentage * 100);
|
|
1141
1207
|
}
|
|
1142
1208
|
case "get-change-percent": {
|
|
1143
1209
|
const { oldValue, newValue } = options;
|
|
1144
|
-
if (
|
|
1210
|
+
if (require_basics.areInvalidNumbers(oldValue, newValue) || oldValue === 0) return NaN;
|
|
1145
1211
|
return _roundNumber((newValue - oldValue) / oldValue * 100);
|
|
1146
1212
|
}
|
|
1147
1213
|
case "apply-percent-change": {
|
|
1148
1214
|
const { baseValue, percentage } = options;
|
|
1149
|
-
if (
|
|
1215
|
+
if (require_basics.areInvalidNumbers(baseValue, percentage)) return NaN;
|
|
1150
1216
|
return _roundNumber(baseValue * (1 + percentage / 100));
|
|
1151
1217
|
}
|
|
1152
1218
|
case "get-percent-difference": {
|
|
1153
1219
|
const { value1, value2 } = options;
|
|
1154
|
-
if (
|
|
1220
|
+
if (require_basics.areInvalidNumbers(value1, value2)) return NaN;
|
|
1155
1221
|
const avg = getAverage(value1, value2);
|
|
1156
1222
|
if (avg === 0) return NaN;
|
|
1157
1223
|
return _roundNumber(Math.abs(value1 - value2) / avg * 100);
|
|
1158
1224
|
}
|
|
1159
1225
|
case "inverse-percent": {
|
|
1160
1226
|
const { part, total } = options;
|
|
1161
|
-
if (
|
|
1227
|
+
if (require_basics.areInvalidNumbers(part, total) || part === 0) return NaN;
|
|
1162
1228
|
return _roundNumber(total / part * 100);
|
|
1163
1229
|
}
|
|
1164
1230
|
default: return NaN;
|
|
@@ -1539,7 +1605,7 @@ function getNumbersInRange(type = "any", options) {
|
|
|
1539
1605
|
if (type === "prime" && !require_primitives.isUndefined(multiplesOf)) console.warn("Warning: The \"multiplesOf\" option is ignored when the type is \"prime\"!");
|
|
1540
1606
|
switch (type) {
|
|
1541
1607
|
case "random":
|
|
1542
|
-
output =
|
|
1608
|
+
output = require_basics.shuffleArray(_applyRangeOptions(min, max).map((n) => getRandomNumber({
|
|
1543
1609
|
min: n,
|
|
1544
1610
|
max: n,
|
|
1545
1611
|
includeMin,
|
|
@@ -1547,13 +1613,13 @@ function getNumbersInRange(type = "any", options) {
|
|
|
1547
1613
|
})));
|
|
1548
1614
|
break;
|
|
1549
1615
|
case "prime":
|
|
1550
|
-
output = _applyRangeOptions(min, max).filter(
|
|
1616
|
+
output = _applyRangeOptions(min, max).filter(require_basics.isPrime);
|
|
1551
1617
|
break;
|
|
1552
1618
|
case "odd":
|
|
1553
|
-
output = _applyRangeOptions(min, max).filter(
|
|
1619
|
+
output = _applyRangeOptions(min, max).filter(require_basics.isOdd);
|
|
1554
1620
|
break;
|
|
1555
1621
|
case "even":
|
|
1556
|
-
output = _applyRangeOptions(min, max).filter(
|
|
1622
|
+
output = _applyRangeOptions(min, max).filter(require_basics.isEven);
|
|
1557
1623
|
break;
|
|
1558
1624
|
case "natural":
|
|
1559
1625
|
output = _applyRangeOptions(Math.max(min, 1), max);
|
|
@@ -1563,7 +1629,7 @@ function getNumbersInRange(type = "any", options) {
|
|
|
1563
1629
|
break;
|
|
1564
1630
|
}
|
|
1565
1631
|
if (type !== "prime") output = _applyMultiples(output, multiplesOf);
|
|
1566
|
-
return getAsString ?
|
|
1632
|
+
return getAsString ? require_utils.convertArrayToString(output, { separator }) : output;
|
|
1567
1633
|
}
|
|
1568
1634
|
|
|
1569
1635
|
//#endregion
|
|
@@ -1593,7 +1659,7 @@ function createOptionsArray(data, config) {
|
|
|
1593
1659
|
* @returns A new array with duplicates removed.
|
|
1594
1660
|
*/
|
|
1595
1661
|
function removeDuplicatesFromArray(array) {
|
|
1596
|
-
return array?.filter((item, index, self) => index === self?.findIndex((el) =>
|
|
1662
|
+
return array?.filter((item, index, self) => index === self?.findIndex((el) => require_utils.isDeepEqual(el, item)));
|
|
1597
1663
|
}
|
|
1598
1664
|
/**
|
|
1599
1665
|
* * Finds duplicate values in an array, runs deep comparison for objects and arrays.
|
|
@@ -1605,8 +1671,8 @@ function getDuplicates(array) {
|
|
|
1605
1671
|
const seen = [];
|
|
1606
1672
|
const duplicates = [];
|
|
1607
1673
|
for (const item of array) {
|
|
1608
|
-
const hasSeen = seen?.find((el) =>
|
|
1609
|
-
const hasDuplicate = duplicates?.find((el) =>
|
|
1674
|
+
const hasSeen = seen?.find((el) => require_utils.isDeepEqual(el, item));
|
|
1675
|
+
const hasDuplicate = duplicates?.find((el) => require_utils.isDeepEqual(el, item));
|
|
1610
1676
|
if (hasSeen && !hasDuplicate) duplicates?.push(item);
|
|
1611
1677
|
else if (!hasSeen) seen?.push(item);
|
|
1612
1678
|
}
|
|
@@ -1631,7 +1697,7 @@ function getDuplicates(array) {
|
|
|
1631
1697
|
function findMissingElements(array1, array2, missingFrom) {
|
|
1632
1698
|
const source = (missingFrom === "from-first" ? array1 : array2) ?? [];
|
|
1633
1699
|
const target = (missingFrom === "from-first" ? array2 : array1) ?? [];
|
|
1634
|
-
return source.filter((s) => !target?.some((t) =>
|
|
1700
|
+
return source.filter((s) => !target?.some((t) => require_utils.isDeepEqual(t, s)));
|
|
1635
1701
|
}
|
|
1636
1702
|
/**
|
|
1637
1703
|
* * Splits an array into chunks of a given size.
|
|
@@ -1665,7 +1731,7 @@ function splitArrayByProperty(source, property) {
|
|
|
1665
1731
|
if (!require_specials.isValidArray(source)) return [];
|
|
1666
1732
|
const grouped = {};
|
|
1667
1733
|
source.forEach((item) => {
|
|
1668
|
-
const rawKey =
|
|
1734
|
+
const rawKey = require_utils._resolveNestedKey(item, property);
|
|
1669
1735
|
const key = rawKey != null ? String(rawKey) : "__undefined__";
|
|
1670
1736
|
if (!grouped[key]) grouped[key] = [];
|
|
1671
1737
|
grouped[key].push(item);
|
|
@@ -1718,7 +1784,7 @@ function moveArrayElement(arr, fromIndex, toIndex) {
|
|
|
1718
1784
|
function sumFieldDifference(data, first, second, roundTo = 2) {
|
|
1719
1785
|
if (!require_specials.isValidArray(data)) return 0;
|
|
1720
1786
|
const total = data?.reduce((acc, item) => {
|
|
1721
|
-
return acc + (
|
|
1787
|
+
return acc + (require_utils._getNumericProp(item, first) - require_utils._getNumericProp(item, second));
|
|
1722
1788
|
}, 0);
|
|
1723
1789
|
return roundNumber(total, roundTo);
|
|
1724
1790
|
}
|
|
@@ -1736,7 +1802,7 @@ function sumFieldDifference(data, first, second, roundTo = 2) {
|
|
|
1736
1802
|
*/
|
|
1737
1803
|
function sumByField(data, field, roundTo = 2) {
|
|
1738
1804
|
if (!require_specials.isValidArray(data)) return 0;
|
|
1739
|
-
const total = data?.reduce((acc, item) => acc +
|
|
1805
|
+
const total = data?.reduce((acc, item) => acc + require_utils._getNumericProp(item, field), 0);
|
|
1740
1806
|
return roundNumber(total, roundTo);
|
|
1741
1807
|
}
|
|
1742
1808
|
/**
|
|
@@ -1753,7 +1819,7 @@ function sumByField(data, field, roundTo = 2) {
|
|
|
1753
1819
|
*/
|
|
1754
1820
|
function averageByField(data, field, roundTo = 2) {
|
|
1755
1821
|
if (!require_specials.isValidArray(data)) return 0;
|
|
1756
|
-
const total = data?.reduce((acc, item) => acc +
|
|
1822
|
+
const total = data?.reduce((acc, item) => acc + require_utils._getNumericProp(item, field), 0);
|
|
1757
1823
|
return roundNumber(total / data.length, roundTo);
|
|
1758
1824
|
}
|
|
1759
1825
|
/**
|
|
@@ -1771,7 +1837,7 @@ function averageByField(data, field, roundTo = 2) {
|
|
|
1771
1837
|
*/
|
|
1772
1838
|
function groupAndSumByField(data, groupBy, sumBy, roundTo = 2) {
|
|
1773
1839
|
if (!require_specials.isValidArray(data)) return [];
|
|
1774
|
-
return splitArrayByProperty(data, groupBy).map((group) => ({ [`${
|
|
1840
|
+
return splitArrayByProperty(data, groupBy).map((group) => ({ [`${require_utils._resolveNestedKey(group[0], groupBy)}`]: sumByField(group, sumBy, roundTo) }));
|
|
1775
1841
|
}
|
|
1776
1842
|
/**
|
|
1777
1843
|
* * Groups an array of objects by a primitive field and averages another numeric field per group.
|
|
@@ -1788,7 +1854,7 @@ function groupAndSumByField(data, groupBy, sumBy, roundTo = 2) {
|
|
|
1788
1854
|
*/
|
|
1789
1855
|
function groupAndAverageByField(data, groupBy, averageBy, roundTo = 2) {
|
|
1790
1856
|
if (!require_specials.isValidArray(data)) return [];
|
|
1791
|
-
return splitArrayByProperty(data, groupBy).map((group) => ({ [`${
|
|
1857
|
+
return splitArrayByProperty(data, groupBy).map((group) => ({ [`${require_utils._resolveNestedKey(group[0], groupBy)}`]: averageByField(group, averageBy, roundTo) }));
|
|
1792
1858
|
}
|
|
1793
1859
|
|
|
1794
1860
|
//#endregion
|
|
@@ -2176,7 +2242,9 @@ exports.Currency = Currency;
|
|
|
2176
2242
|
exports.Finder = Finder;
|
|
2177
2243
|
exports.Unit = Unit;
|
|
2178
2244
|
exports.UnitConverter = Unit;
|
|
2245
|
+
exports.add = safeAdd;
|
|
2179
2246
|
exports.arabicToRoman = convertToRomanNumerals;
|
|
2247
|
+
exports.average = getAverage;
|
|
2180
2248
|
exports.averageByField = averageByField;
|
|
2181
2249
|
exports.avgByField = averageByField;
|
|
2182
2250
|
exports.banglaToDigit = banglaToDigit;
|
|
@@ -2191,11 +2259,11 @@ exports.capitalizeString = require_case.capitalizeString;
|
|
|
2191
2259
|
exports.cardinalToOrdinal = require_utilities.getOrdinal;
|
|
2192
2260
|
exports.cardinalWordsToOrdinal = numberToWordsOrdinal;
|
|
2193
2261
|
exports.clampNumber = require_utilities.clampNumber;
|
|
2194
|
-
exports.cloneObject =
|
|
2195
|
-
exports.compareNaturally =
|
|
2196
|
-
exports.compareSorter =
|
|
2262
|
+
exports.cloneObject = require_basics.cloneObject;
|
|
2263
|
+
exports.compareNaturally = require_utils.naturalSort;
|
|
2264
|
+
exports.compareSorter = require_utils.naturalSort;
|
|
2197
2265
|
exports.computeTextDiff = computeTextDiff;
|
|
2198
|
-
exports.convertArrayToString =
|
|
2266
|
+
exports.convertArrayToString = require_utils.convertArrayToString;
|
|
2199
2267
|
exports.convertNumberToCurrency = require_utilities.formatCurrency;
|
|
2200
2268
|
exports.convertNumberToOrdinal = require_utilities.getOrdinal;
|
|
2201
2269
|
exports.convertNumberToWords = numberToWords;
|
|
@@ -2211,58 +2279,59 @@ exports.convertToOrdinal = require_utilities.getOrdinal;
|
|
|
2211
2279
|
exports.convertToRomanNumerals = convertToRomanNumerals;
|
|
2212
2280
|
exports.convertWordToNumber = wordsToNumber;
|
|
2213
2281
|
exports.convertWordsToNumber = wordsToNumber;
|
|
2214
|
-
exports.countInstanceMethods =
|
|
2215
|
-
exports.countObjectFields =
|
|
2216
|
-
exports.countStaticMethods =
|
|
2282
|
+
exports.countInstanceMethods = require_utils.countInstanceMethods;
|
|
2283
|
+
exports.countObjectFields = require_basics.countObjectFields;
|
|
2284
|
+
exports.countStaticMethods = require_utils.countStaticMethods;
|
|
2217
2285
|
exports.countWords = countWords;
|
|
2218
2286
|
exports.countWordsInString = countWords;
|
|
2219
2287
|
exports.createOptionsArray = createOptionsArray;
|
|
2220
2288
|
exports.createQueryParams = require_query.generateQueryParams;
|
|
2221
|
-
exports.debounceAction =
|
|
2222
|
-
exports.
|
|
2223
|
-
exports.
|
|
2289
|
+
exports.debounceAction = require_utils.debounceAction;
|
|
2290
|
+
exports.decimalPlaces = getDecimalPlaces;
|
|
2291
|
+
exports.deepParsePrimitives = require_utils.deepParsePrimitives;
|
|
2292
|
+
exports.definePrototypeMethod = require_utils.definePrototypeMethod;
|
|
2224
2293
|
exports.deleteFields = deleteFields;
|
|
2225
2294
|
exports.deleteObjectFields = deleteFields;
|
|
2226
2295
|
exports.digitToBangla = digitToBangla;
|
|
2227
2296
|
exports.extractDuplicates = getDuplicates;
|
|
2228
2297
|
exports.extractDuplicatesFromArray = getDuplicates;
|
|
2229
|
-
exports.extractEmails =
|
|
2230
|
-
exports.extractEntries =
|
|
2231
|
-
exports.extractKeys =
|
|
2232
|
-
exports.extractKeysDeep =
|
|
2298
|
+
exports.extractEmails = require_basics.extractEmails;
|
|
2299
|
+
exports.extractEntries = require_basics.extractObjectEntries;
|
|
2300
|
+
exports.extractKeys = require_basics.extractObjectKeys;
|
|
2301
|
+
exports.extractKeysDeep = require_basics.extractObjectKeysDeep;
|
|
2233
2302
|
exports.extractMissingElements = findMissingElements;
|
|
2234
2303
|
exports.extractNewFields = require_query.extractNewFields;
|
|
2235
2304
|
exports.extractNumbers = extractNumbersFromString;
|
|
2236
2305
|
exports.extractNumbersFromString = extractNumbersFromString;
|
|
2237
|
-
exports.extractObjectEntries =
|
|
2238
|
-
exports.extractObjectKeys =
|
|
2239
|
-
exports.extractObjectKeysDeep =
|
|
2240
|
-
exports.extractURLs =
|
|
2306
|
+
exports.extractObjectEntries = require_basics.extractObjectEntries;
|
|
2307
|
+
exports.extractObjectKeys = require_basics.extractObjectKeys;
|
|
2308
|
+
exports.extractObjectKeysDeep = require_basics.extractObjectKeysDeep;
|
|
2309
|
+
exports.extractURLs = require_basics.extractURLs;
|
|
2241
2310
|
exports.extractUpdatedAndNewFields = require_query.extractUpdatedAndNewFields;
|
|
2242
2311
|
exports.extractUpdatedFields = require_query.extractUpdatedFields;
|
|
2243
2312
|
exports.factorial = factorial;
|
|
2244
2313
|
exports.factorsOf = getFactors;
|
|
2245
2314
|
exports.fibonacciGenerator = fibonacciGenerator;
|
|
2246
|
-
exports.filterArrayOfObjects =
|
|
2315
|
+
exports.filterArrayOfObjects = require_basics.filterArrayOfObjects;
|
|
2247
2316
|
exports.findMissingElements = findMissingElements;
|
|
2248
|
-
exports.findPrimeNumbers =
|
|
2249
|
-
exports.flattenArray =
|
|
2317
|
+
exports.findPrimeNumbers = require_basics.findPrimeNumbers;
|
|
2318
|
+
exports.flattenArray = require_basics.flattenArray;
|
|
2250
2319
|
exports.flattenObjectDotNotation = require_query.flattenObjectDotNotation;
|
|
2251
2320
|
exports.flattenObjectKeyValue = require_query.flattenObjectKeyValue;
|
|
2252
2321
|
exports.formatCurrency = require_utilities.formatCurrency;
|
|
2253
|
-
exports.formatNumberWithPluralUnit =
|
|
2322
|
+
exports.formatNumberWithPluralUnit = require_basics.formatUnitWithPlural;
|
|
2254
2323
|
exports.formatQueryParams = require_query.generateQueryParams;
|
|
2255
|
-
exports.formatUnitWithPlural =
|
|
2256
|
-
exports.formatWithPlural =
|
|
2324
|
+
exports.formatUnitWithPlural = require_basics.formatUnitWithPlural;
|
|
2325
|
+
exports.formatWithPlural = require_basics.formatUnitWithPlural;
|
|
2257
2326
|
exports.generateAnagrams = generateAnagrams;
|
|
2258
2327
|
exports.generateFibonacci = fibonacciGenerator;
|
|
2259
2328
|
exports.generateQueryParams = require_query.generateQueryParams;
|
|
2260
|
-
exports.generateRandomID =
|
|
2329
|
+
exports.generateRandomID = require_utils.generateRandomID;
|
|
2261
2330
|
exports.getAverage = getAverage;
|
|
2262
|
-
exports.getAverageOfNumbers = getAverage;
|
|
2263
2331
|
exports.getCharacterDifferences = getCharacterDifferences;
|
|
2264
|
-
exports.getClassDetails =
|
|
2332
|
+
exports.getClassDetails = require_utils.getClassDetails;
|
|
2265
2333
|
exports.getCountryByPhone = getCountryByPhone;
|
|
2334
|
+
exports.getDecimalPlaces = getDecimalPlaces;
|
|
2266
2335
|
exports.getDivisors = getFactors;
|
|
2267
2336
|
exports.getDuplicates = getDuplicates;
|
|
2268
2337
|
exports.getDuplicatesFromArray = getDuplicates;
|
|
@@ -2272,10 +2341,10 @@ exports.getFibonacci = getFibonacciSeries;
|
|
|
2272
2341
|
exports.getFibonacciNumbers = getFibonacciSeries;
|
|
2273
2342
|
exports.getFibonacciSeries = getFibonacciSeries;
|
|
2274
2343
|
exports.getFibonacciSeriesMemo = getFibonacciSeriesMemo;
|
|
2275
|
-
exports.getInstanceGetterNames =
|
|
2276
|
-
exports.getInstanceMethodNames =
|
|
2277
|
-
exports.getInstanceMethodsCount =
|
|
2278
|
-
exports.getLastArrayElement =
|
|
2344
|
+
exports.getInstanceGetterNames = require_utils.getInstanceGetterNames;
|
|
2345
|
+
exports.getInstanceMethodNames = require_utils.getInstanceMethodNames;
|
|
2346
|
+
exports.getInstanceMethodsCount = require_utils.countInstanceMethods;
|
|
2347
|
+
exports.getLastArrayElement = require_basics.getLastArrayElement;
|
|
2279
2348
|
exports.getLevenshteinDistance = getLevenshteinDistance;
|
|
2280
2349
|
exports.getMemoizedFibonacci = getFibonacciSeriesMemo;
|
|
2281
2350
|
exports.getMemoizedFibonacciSeries = getFibonacciSeriesMemo;
|
|
@@ -2284,50 +2353,50 @@ exports.getNthFibonacci = getNthFibonacci;
|
|
|
2284
2353
|
exports.getNumbersInRange = getNumbersInRange;
|
|
2285
2354
|
exports.getOrdinal = require_utilities.getOrdinal;
|
|
2286
2355
|
exports.getOrdinalNumber = require_utilities.getOrdinal;
|
|
2287
|
-
exports.getPrimeNumbers =
|
|
2356
|
+
exports.getPrimeNumbers = require_basics.findPrimeNumbers;
|
|
2288
2357
|
exports.getQueryStringAsObject = require_query.parseQueryString;
|
|
2289
2358
|
exports.getRandomDecimal = require_utilities.getRandomFloat;
|
|
2290
2359
|
exports.getRandomFloat = require_utilities.getRandomFloat;
|
|
2291
2360
|
exports.getRandomInt = getRandomNumber;
|
|
2292
2361
|
exports.getRandomNumber = getRandomNumber;
|
|
2293
|
-
exports.getStaticGetterNames =
|
|
2294
|
-
exports.getStaticMethodNames =
|
|
2295
|
-
exports.getStaticMethodsCount =
|
|
2362
|
+
exports.getStaticGetterNames = require_utils.getStaticGetterNames;
|
|
2363
|
+
exports.getStaticMethodNames = require_utils.getStaticMethodNames;
|
|
2364
|
+
exports.getStaticMethodsCount = require_utils.countStaticMethods;
|
|
2296
2365
|
exports.getSumOfNumbers = sumNumbers;
|
|
2297
2366
|
exports.groupAndAverageByField = groupAndAverageByField;
|
|
2298
2367
|
exports.groupAndAvgByField = groupAndAverageByField;
|
|
2299
2368
|
exports.groupAndSumByField = groupAndSumByField;
|
|
2300
2369
|
exports.groupArrayByProperty = splitArrayByProperty;
|
|
2301
2370
|
exports.integerToRoman = convertToRomanNumerals;
|
|
2302
|
-
exports.isDeepEqual =
|
|
2303
|
-
exports.isInvalidOrEmptyArray =
|
|
2304
|
-
exports.isPrime =
|
|
2305
|
-
exports.isPrimeNumber =
|
|
2306
|
-
exports.joinArrayElements =
|
|
2371
|
+
exports.isDeepEqual = require_utils.isDeepEqual;
|
|
2372
|
+
exports.isInvalidOrEmptyArray = require_basics.isInvalidOrEmptyArray;
|
|
2373
|
+
exports.isPrime = require_basics.isPrime;
|
|
2374
|
+
exports.isPrimeNumber = require_basics.isPrime;
|
|
2375
|
+
exports.joinArrayElements = require_utils.convertArrayToString;
|
|
2307
2376
|
exports.levenshteinDistance = getLevenshteinDistance;
|
|
2308
2377
|
exports.literalQueryStringToObject = require_query.parseQueryStringLiteral;
|
|
2309
|
-
exports.maskString =
|
|
2378
|
+
exports.maskString = require_basics.maskString;
|
|
2310
2379
|
exports.mergeAndFlattenObjects = require_query.mergeAndFlattenObjects;
|
|
2311
2380
|
exports.mergeObjects = require_query.mergeObjects;
|
|
2312
2381
|
exports.moveArrayElement = moveArrayElement;
|
|
2313
|
-
exports.naturalSort =
|
|
2314
|
-
exports.naturalSortForString =
|
|
2382
|
+
exports.naturalSort = require_utils.naturalSort;
|
|
2383
|
+
exports.naturalSortForString = require_utils.naturalSort;
|
|
2315
2384
|
exports.normalizeNumber = require_utilities.normalizeNumber;
|
|
2316
|
-
exports.normalizeString =
|
|
2385
|
+
exports.normalizeString = require_basics.normalizeString;
|
|
2317
2386
|
exports.numberToOrdinal = require_utilities.getOrdinal;
|
|
2318
2387
|
exports.numberToRoman = convertToRomanNumerals;
|
|
2319
2388
|
exports.numberToWords = numberToWords;
|
|
2320
2389
|
exports.numberToWordsOrdinal = numberToWordsOrdinal;
|
|
2321
2390
|
exports.numericToRoman = convertToRomanNumerals;
|
|
2322
|
-
exports.objectEntries =
|
|
2391
|
+
exports.objectEntries = require_basics.extractObjectEntries;
|
|
2323
2392
|
exports.omitFields = deleteFields;
|
|
2324
2393
|
exports.omitObjectFields = deleteFields;
|
|
2325
|
-
exports.parseJSON =
|
|
2326
|
-
exports.parseJsonDeep =
|
|
2394
|
+
exports.parseJSON = require_utils.parseJSON;
|
|
2395
|
+
exports.parseJsonDeep = require_utils.parseJSON;
|
|
2327
2396
|
exports.parseJsonToObject = require_query.parseJsonToObject;
|
|
2328
2397
|
exports.parseNumbersFromText = extractNumbersFromString;
|
|
2329
2398
|
exports.parseObjectValues = require_query.parseObjectValues;
|
|
2330
|
-
exports.parsePrimitivesDeep =
|
|
2399
|
+
exports.parsePrimitivesDeep = require_utils.deepParsePrimitives;
|
|
2331
2400
|
exports.parseQueryString = require_query.parseQueryString;
|
|
2332
2401
|
exports.parseQueryStringLiteral = require_query.parseQueryStringLiteral;
|
|
2333
2402
|
exports.parseStringifiedObjectValues = require_query.parseObjectValues;
|
|
@@ -2342,9 +2411,9 @@ exports.removeDuplicates = removeDuplicatesFromArray;
|
|
|
2342
2411
|
exports.removeDuplicatesFromArray = removeDuplicatesFromArray;
|
|
2343
2412
|
exports.removeFields = deleteFields;
|
|
2344
2413
|
exports.removeObjectFields = deleteFields;
|
|
2345
|
-
exports.replaceAllInString =
|
|
2414
|
+
exports.replaceAllInString = require_basics.replaceAllInString;
|
|
2346
2415
|
exports.reverseNumber = reverseNumber;
|
|
2347
|
-
exports.reverseString =
|
|
2416
|
+
exports.reverseString = require_basics.reverseString;
|
|
2348
2417
|
exports.romanToArabic = romanToInteger;
|
|
2349
2418
|
exports.romanToInteger = romanToInteger;
|
|
2350
2419
|
exports.romanToNumeric = romanToInteger;
|
|
@@ -2354,25 +2423,26 @@ exports.roundNumberToNearestInterval = require_utilities.roundToNearest;
|
|
|
2354
2423
|
exports.roundToDecimal = roundNumber;
|
|
2355
2424
|
exports.roundToNearest = require_utilities.roundToNearest;
|
|
2356
2425
|
exports.roundToNearestInterval = require_utilities.roundToNearest;
|
|
2426
|
+
exports.safeAdd = safeAdd;
|
|
2357
2427
|
exports.sanitizeData = require_query.sanitizeData;
|
|
2358
|
-
exports.shuffleArray =
|
|
2359
|
-
exports.slugifyString =
|
|
2360
|
-
exports.sortAnArray =
|
|
2428
|
+
exports.shuffleArray = require_basics.shuffleArray;
|
|
2429
|
+
exports.slugifyString = require_basics.slugifyString;
|
|
2430
|
+
exports.sortAnArray = require_utils.sortAnArray;
|
|
2361
2431
|
exports.splitArray = splitArray;
|
|
2362
2432
|
exports.splitArrayByProperty = splitArrayByProperty;
|
|
2363
|
-
exports.stableStringify =
|
|
2364
|
-
exports.stripJsonEdgeGarbage =
|
|
2433
|
+
exports.stableStringify = require_utils.stableStringify;
|
|
2434
|
+
exports.stripJsonEdgeGarbage = require_utils.stripJsonEdgeGarbage;
|
|
2365
2435
|
exports.sumByField = sumByField;
|
|
2366
2436
|
exports.sumDigits = sumDigits;
|
|
2367
2437
|
exports.sumFieldDifference = sumFieldDifference;
|
|
2368
2438
|
exports.sumNumbers = sumNumbers;
|
|
2369
2439
|
exports.sumOfNumbers = sumNumbers;
|
|
2370
|
-
exports.throttleAction =
|
|
2440
|
+
exports.throttleAction = require_utils.throttleAction;
|
|
2371
2441
|
exports.toRoman = convertToRomanNumerals;
|
|
2372
2442
|
exports.toRomanNumeral = convertToRomanNumerals;
|
|
2373
2443
|
exports.totalDeltaByField = sumFieldDifference;
|
|
2374
|
-
exports.trimString =
|
|
2375
|
-
exports.truncateString =
|
|
2444
|
+
exports.trimString = require_utils.trimString;
|
|
2445
|
+
exports.truncateString = require_utils.truncateString;
|
|
2376
2446
|
exports.wordCount = countWords;
|
|
2377
2447
|
exports.wordToNumber = wordsToNumber;
|
|
2378
2448
|
exports.wordsToNumber = wordsToNumber;
|
package/dist/index.d.cts
CHANGED
|
@@ -292,6 +292,51 @@ declare function reverseNumber(num: Numeric): number;
|
|
|
292
292
|
* @returns The average of the provided numbers. Returns `NaN` if no numbers are valid.
|
|
293
293
|
*/
|
|
294
294
|
declare function getAverage(...numbers: Numeric[]): number;
|
|
295
|
+
/**
|
|
296
|
+
* * Returns the number of decimal places represented by a number.
|
|
297
|
+
*
|
|
298
|
+
* @param value - The number or numeric string for which to calculate the number of decimal places.
|
|
299
|
+
* @returns The number of decimal places.
|
|
300
|
+
*
|
|
301
|
+
* @throws - {@link TypeError} - If the input value cannot be converted to a number, e.g. `undefined`, `null`, `NaN`, `'11x'` etc..
|
|
302
|
+
*
|
|
303
|
+
* @remarks
|
|
304
|
+
* - If a numeric string in scientific notation (e.g., '1e-6') is provided, it will calculate the decimal places accordingly.
|
|
305
|
+
* - If a numeric string has trailing zeros (e.g., ''1.00'' or `'9.900'`),
|
|
306
|
+
* it will convert them as: `'1.00'` -> `1`, `'9.900'` -> `9.9` and return `0` and `1` respectively.
|
|
307
|
+
* - If a number is an integer, it will return `0`.
|
|
308
|
+
* - Internally uses {@link normalizeNumber} to normalize the input value.
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* getDecimalPlaces(123.456); // 3
|
|
312
|
+
* getDecimalPlaces('123.45600'); // 3
|
|
313
|
+
* getDecimalPlaces(123); // 0
|
|
314
|
+
* getDecimalPlaces('1e-6'); // 6
|
|
315
|
+
* getDecimalPlaces('1.00'); // 0
|
|
316
|
+
* getDecimalPlaces('9.900'); // 1
|
|
317
|
+
*/
|
|
318
|
+
declare function getDecimalPlaces(value: Numeric): number;
|
|
319
|
+
/**
|
|
320
|
+
* * Adds numbers safely, avoiding floating-point arithmetic issues.
|
|
321
|
+
*
|
|
322
|
+
* @param values - A list of numbers or numeric strings to add.
|
|
323
|
+
* @returns The sum of the provided numbers, with floating-point inaccuracies mitigated.
|
|
324
|
+
*
|
|
325
|
+
* @remarks
|
|
326
|
+
* - This function addresses common floating-point addition errors (e.g., `0.1 + 0.2 !== 0.3`)
|
|
327
|
+
* by temporarily scaling numbers to integers, performing the addition, and then scaling back.
|
|
328
|
+
* - Non-numeric values are safely ignored in the runtime.
|
|
329
|
+
* - Rounding is used to mitigate floating-point inaccuracies.
|
|
330
|
+
* - Intended for use cases where floating-point inaccuracies are a concern.
|
|
331
|
+
* - Internally uses {@link normalizeNumber}, {@link getDecimalPlaces}, {@link roundNumber}.
|
|
332
|
+
* - It does not handle numbers beyond {@link Number.MAX_SAFE_INTEGER} or {@link Number.MIN_SAFE_INTEGER}.
|
|
333
|
+
* May output incorrect results if the numbers are too large.
|
|
334
|
+
* @example
|
|
335
|
+
* safeAdd(0.1, 0.2); // → 0.3 (correctly handles floating-point error)
|
|
336
|
+
* safeAdd(1, '2', 3.456); // → 6.456
|
|
337
|
+
* safeAdd(0.1, 0.2, 0.3, 0.4); // → 1.0 (accurate sum)
|
|
338
|
+
*/
|
|
339
|
+
declare function safeAdd(...values: Numeric[]): number;
|
|
295
340
|
/**
|
|
296
341
|
* * Rounds a number to a specified number of decimal places.
|
|
297
342
|
*
|
|
@@ -1235,4 +1280,4 @@ declare function remapFields<Source extends GenericObject, Target extends Record
|
|
|
1235
1280
|
*/
|
|
1236
1281
|
declare function getCountryByPhone(phone: number | string): CountryDetails[];
|
|
1237
1282
|
//#endregion
|
|
1238
|
-
export { Currency, Finder, Unit, Unit as UnitConverter, convertToRomanNumerals as arabicToRoman, convertToRomanNumerals, convertToRomanNumerals as integerToRoman, convertToRomanNumerals as numberToRoman, convertToRomanNumerals as numericToRoman, convertToRomanNumerals as toRoman, convertToRomanNumerals as toRomanNumeral,
|
|
1283
|
+
export { Currency, Finder, Unit, Unit as UnitConverter, safeAdd as add, safeAdd, convertToRomanNumerals as arabicToRoman, convertToRomanNumerals, convertToRomanNumerals as integerToRoman, convertToRomanNumerals as numberToRoman, convertToRomanNumerals as numericToRoman, convertToRomanNumerals as toRoman, convertToRomanNumerals as toRomanNumeral, getAverage as average, getAverage as calculateAverage, getAverage, averageByField, averageByField as avgByField, banglaToDigit, factorial as calculateFactorial, factorial, factorial as getFactorial, calculateHCF as calculateGCD, calculateHCF, calculateLCM as calculateLCD, calculateLCM, calculatePercentage, capitalizeString, getOrdinal as cardinalToOrdinal, getOrdinal as convertNumberToOrdinal, getOrdinal as convertToOrdinal, getOrdinal, getOrdinal as getOrdinalNumber, getOrdinal as numberToOrdinal, numberToWordsOrdinal as cardinalWordsToOrdinal, numberToWordsOrdinal as convertNumberToWordsOrdinal, numberToWordsOrdinal, clampNumber, cloneObject, naturalSort as compareNaturally, naturalSort as compareSorter, naturalSort, naturalSort as naturalSortForString, computeTextDiff, convertArrayToString, convertArrayToString as joinArrayElements, formatCurrency as convertNumberToCurrency, formatCurrency, numberToWords as convertNumberToWords, numberToWords, convertObjectValues, romanToInteger as convertRomanToArabic, romanToInteger as convertRomanToInteger, romanToInteger as convertRomanToNumeric, romanToInteger as romanToArabic, romanToInteger, romanToInteger as romanToNumeric, convertStringCase, convertToDecimal, convertToDecimal as convertToFixed, wordsToNumber as convertWordToNumber, wordsToNumber as convertWordsToNumber, wordsToNumber as wordToNumber, wordsToNumber, countInstanceMethods, countInstanceMethods as getInstanceMethodsCount, countObjectFields, countStaticMethods, countStaticMethods as getStaticMethodsCount, countWords, countWords as countWordsInString, countWords as wordCount, createOptionsArray, generateQueryParams as createQueryParams, generateQueryParams as formatQueryParams, generateQueryParams, debounceAction, getDecimalPlaces as decimalPlaces, getDecimalPlaces, deepParsePrimitives, deepParsePrimitives as parsePrimitivesDeep, definePrototypeMethod, deleteFields, deleteFields as deleteObjectFields, deleteFields as omitFields, deleteFields as omitObjectFields, deleteFields as removeFields, deleteFields as removeObjectFields, digitToBangla, getDuplicates as extractDuplicates, getDuplicates as extractDuplicatesFromArray, getDuplicates, getDuplicates as getDuplicatesFromArray, extractEmails, extractObjectEntries as extractEntries, extractObjectEntries, extractObjectEntries as objectEntries, extractObjectKeys as extractKeys, extractObjectKeys, extractObjectKeysDeep as extractKeysDeep, extractObjectKeysDeep, findMissingElements as extractMissingElements, findMissingElements, findMissingElements as getMissingElements, extractNewFields, extractNumbersFromString as extractNumbers, extractNumbersFromString, extractNumbersFromString as parseNumbersFromText, extractURLs, extractUpdatedAndNewFields, extractUpdatedFields, getFactors as factorsOf, getFactors as getDivisors, getFactors, fibonacciGenerator, fibonacciGenerator as generateFibonacci, filterArrayOfObjects, findPrimeNumbers, findPrimeNumbers as getPrimeNumbers, flattenArray, flattenObjectDotNotation, flattenObjectKeyValue, formatUnitWithPlural as formatNumberWithPluralUnit, formatUnitWithPlural, formatUnitWithPlural as formatWithPlural, generateAnagrams, generateRandomID, getCharacterDifferences, getClassDetails, getCountryByPhone, getFibonacciSeries as getFibonacci, getFibonacciSeries as getFibonacciNumbers, getFibonacciSeries, getFibonacciSeriesMemo, getFibonacciSeriesMemo as getMemoizedFibonacci, getFibonacciSeriesMemo as getMemoizedFibonacciSeries, getInstanceGetterNames, getInstanceMethodNames, getLastArrayElement, getLevenshteinDistance, getLevenshteinDistance as levenshteinDistance, getNthFibonacci, getNumbersInRange, parseQueryString as getQueryStringAsObject, parseQueryString, parseQueryString as queryStringToObject, getRandomFloat as getRandomDecimal, getRandomFloat, getRandomNumber as getRandomInt, getRandomNumber, getStaticGetterNames, getStaticMethodNames, sumNumbers as getSumOfNumbers, sumNumbers, sumNumbers as sumOfNumbers, groupAndAverageByField, groupAndAverageByField as groupAndAvgByField, groupAndSumByField, splitArrayByProperty as groupArrayByProperty, splitArrayByProperty, isDeepEqual, isInvalidOrEmptyArray, isPrime, isPrime as isPrimeNumber, parseQueryStringLiteral as literalQueryStringToObject, parseQueryStringLiteral, maskString, mergeAndFlattenObjects, mergeObjects, moveArrayElement, normalizeNumber, normalizeString, parseJSON, parseJSON as parseJsonDeep, parseJsonToObject, parseObjectValues, parseObjectValues as parseStringifiedObjectValues, pickFields, pickFields as pickObjectFields, pickObjectFieldsByCondition as pickFieldsByCondition, pickObjectFieldsByCondition, remapFields, remapFields as remapObjectFields, removeDuplicatesFromArray as removeDuplicates, removeDuplicatesFromArray, replaceAllInString, reverseNumber, reverseString, rotateArray, roundNumber, roundNumber as roundToDecimal, roundToNearest as roundNumberToNearestInterval, roundToNearest, roundToNearest as roundToNearestInterval, sanitizeData, shuffleArray, slugifyString, sortAnArray, splitArray, stableStringify, stripJsonEdgeGarbage, sumByField, sumDigits, sumFieldDifference, sumFieldDifference as totalDeltaByField, throttleAction, trimString, truncateString };
|