umt 2.16.0 → 2.17.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 +42 -0
- package/module/Array/chunk.js.map +1 -1
- package/module/Array/uniqBy.js.map +1 -1
- package/module/Async/debounceAsync.d.ts +18 -0
- package/module/Async/debounceAsync.js +59 -0
- package/module/Async/debounceAsync.js.map +1 -0
- package/module/Async/index.d.ts +5 -0
- package/module/Async/index.js +5 -0
- package/module/Async/index.js.map +1 -1
- package/module/Async/pSettled.d.ts +19 -0
- package/module/Async/pSettled.js +54 -0
- package/module/Async/pSettled.js.map +1 -0
- package/module/Async/retry.d.ts +22 -0
- package/module/Async/retry.js +49 -0
- package/module/Async/retry.js.map +1 -0
- package/module/Async/throttleAsync.d.ts +18 -0
- package/module/Async/throttleAsync.js +41 -0
- package/module/Async/throttleAsync.js.map +1 -0
- package/module/Async/waitFor.d.ts +18 -0
- package/module/Async/waitFor.js +32 -0
- package/module/Async/waitFor.js.map +1 -0
- package/module/Date/addDuration.d.ts +15 -0
- package/module/Date/addDuration.js +40 -0
- package/module/Date/addDuration.js.map +1 -0
- package/module/Date/diff.d.ts +14 -0
- package/module/Date/diff.js +45 -0
- package/module/Date/diff.js.map +1 -0
- package/module/Date/durationUnit.d.ts +12 -0
- package/module/Date/durationUnit.js +2 -0
- package/module/Date/durationUnit.js.map +1 -0
- package/module/Date/endOf.d.ts +13 -0
- package/module/Date/endOf.js +58 -0
- package/module/Date/endOf.js.map +1 -0
- package/module/Date/formatRelative.d.ts +13 -0
- package/module/Date/formatRelative.js +35 -0
- package/module/Date/formatRelative.js.map +1 -0
- package/module/Date/index.d.ts +10 -0
- package/module/Date/index.js +10 -0
- package/module/Date/index.js.map +1 -1
- package/module/Date/isBusinessDay.d.ts +10 -0
- package/module/Date/isBusinessDay.js +18 -0
- package/module/Date/isBusinessDay.js.map +1 -0
- package/module/Date/isSameDay.d.ts +10 -0
- package/module/Date/isSameDay.js +13 -0
- package/module/Date/isSameDay.js.map +1 -0
- package/module/Date/isWeekend.d.ts +9 -0
- package/module/Date/isWeekend.js +13 -0
- package/module/Date/isWeekend.js.map +1 -0
- package/module/Date/msByUnit.d.ts +2 -0
- package/module/Date/msByUnit.js +10 -0
- package/module/Date/msByUnit.js.map +1 -0
- package/module/Date/startOf.d.ts +13 -0
- package/module/Date/startOf.js +58 -0
- package/module/Date/startOf.js.map +1 -0
- package/module/Date/subDuration.d.ts +13 -0
- package/module/Date/subDuration.js +14 -0
- package/module/Date/subDuration.js.map +1 -0
- package/module/Error/index.d.ts +0 -1
- package/module/Error/index.js +0 -1
- package/module/Error/index.js.map +1 -1
- package/module/Object/deepClone.js.map +1 -1
- package/module/Object/flattenObject.d.ts +11 -0
- package/module/Object/flattenObject.js +29 -0
- package/module/Object/flattenObject.js.map +1 -0
- package/module/Object/get.d.ts +1 -0
- package/module/Object/get.js +26 -0
- package/module/Object/get.js.map +1 -0
- package/module/Object/has.d.ts +0 -19
- package/module/Object/has.js +4 -4
- package/module/Object/has.js.map +1 -1
- package/module/Object/index.d.ts +8 -0
- package/module/Object/index.js +8 -0
- package/module/Object/index.js.map +1 -1
- package/module/Object/invert.d.ts +12 -0
- package/module/Object/invert.js +20 -0
- package/module/Object/invert.js.map +1 -0
- package/module/Object/mergeDeep.js.map +1 -1
- package/module/Object/omitBy.d.ts +11 -0
- package/module/Object/omitBy.js +21 -0
- package/module/Object/omitBy.js.map +1 -0
- package/module/Object/pathSegments.d.ts +1 -0
- package/module/Object/pathSegments.js +2 -0
- package/module/Object/pathSegments.js.map +1 -0
- package/module/Object/pickBy.d.ts +11 -0
- package/module/Object/pickBy.js +21 -0
- package/module/Object/pickBy.js.map +1 -0
- package/module/Object/set.d.ts +19 -0
- package/module/Object/set.js +38 -0
- package/module/Object/set.js.map +1 -0
- package/module/Object/unflattenObject.d.ts +15 -0
- package/module/Object/unflattenObject.js +23 -0
- package/module/Object/unflattenObject.js.map +1 -0
- package/module/Random/index.d.ts +7 -0
- package/module/Random/index.js +8 -0
- package/module/Random/index.js.map +1 -0
- package/module/Random/randomBoolean.d.ts +9 -0
- package/module/Random/randomBoolean.js +10 -0
- package/module/Random/randomBoolean.js.map +1 -0
- package/module/Random/randomChoice.d.ts +9 -0
- package/module/Random/randomChoice.js +13 -0
- package/module/Random/randomChoice.js.map +1 -0
- package/module/Random/randomFloat.d.ts +9 -0
- package/module/Random/randomFloat.js +10 -0
- package/module/Random/randomFloat.js.map +1 -0
- package/module/Random/randomInt.d.ts +9 -0
- package/module/Random/randomInt.js +14 -0
- package/module/Random/randomInt.js.map +1 -0
- package/module/Random/randomUuid.d.ts +9 -0
- package/module/Random/randomUuid.js +31 -0
- package/module/Random/randomUuid.js.map +1 -0
- package/module/Random/seededRandom.d.ts +11 -0
- package/module/Random/seededRandom.js +31 -0
- package/module/Random/seededRandom.js.map +1 -0
- package/module/Random/weightedChoice.d.ts +15 -0
- package/module/Random/weightedChoice.js +34 -0
- package/module/Random/weightedChoice.js.map +1 -0
- package/module/String/capitalize.d.ts +12 -0
- package/module/String/capitalize.js +18 -0
- package/module/String/capitalize.js.map +1 -0
- package/module/String/capitalizeWord.d.ts +1 -0
- package/module/String/capitalizeWord.js +2 -0
- package/module/String/capitalizeWord.js.map +1 -0
- package/module/String/dedent.d.ts +19 -0
- package/module/String/dedent.js +56 -0
- package/module/String/dedent.js.map +1 -0
- package/module/String/index.d.ts +10 -0
- package/module/String/index.js +10 -0
- package/module/String/index.js.map +1 -1
- package/module/String/mask.d.ts +20 -0
- package/module/String/mask.js +24 -0
- package/module/String/mask.js.map +1 -0
- package/module/String/pascalCase.d.ts +9 -0
- package/module/String/pascalCase.js +14 -0
- package/module/String/pascalCase.js.map +1 -0
- package/module/String/snakeCase.d.ts +9 -0
- package/module/String/snakeCase.js +13 -0
- package/module/String/snakeCase.js.map +1 -0
- package/module/String/titleCase.d.ts +9 -0
- package/module/String/titleCase.js +14 -0
- package/module/String/titleCase.js.map +1 -0
- package/module/String/uncapitalize.d.ts +10 -0
- package/module/String/uncapitalize.js +16 -0
- package/module/String/uncapitalize.js.map +1 -0
- package/module/String/wordCount.d.ts +10 -0
- package/module/String/wordCount.js +12 -0
- package/module/String/wordCount.js.map +1 -0
- package/module/String/words.d.ts +12 -0
- package/module/String/words.js +21 -0
- package/module/String/words.js.map +1 -0
- package/module/Tool/createPipeline.d.ts +1 -1
- package/module/Tool/createPipeline.js +8 -6
- package/module/Tool/createPipeline.js.map +1 -1
- package/module/Tool/pipe.js.map +1 -1
- package/module/URL/buildUrl.d.ts +10 -0
- package/module/URL/buildUrl.js +10 -4
- package/module/URL/buildUrl.js.map +1 -1
- package/module/URL/parseQueryString.d.ts +6 -0
- package/module/URL/parseQueryString.js +6 -4
- package/module/URL/parseQueryString.js.map +1 -1
- package/module/Validate/isNumber.js.map +1 -1
- package/module/Validate/object/core.js +0 -1
- package/module/Validate/object/core.js.map +1 -1
- package/module/es5/Async/debounceAsync.d.ts +18 -0
- package/module/es5/Async/debounceAsync.js +103 -0
- package/module/es5/Async/index.d.ts +5 -0
- package/module/es5/Async/index.js +55 -0
- package/module/es5/Async/pSettled.d.ts +19 -0
- package/module/es5/Async/pSettled.js +68 -0
- package/module/es5/Async/retry.d.ts +22 -0
- package/module/es5/Async/retry.js +106 -0
- package/module/es5/Async/throttleAsync.d.ts +18 -0
- package/module/es5/Async/throttleAsync.js +46 -0
- package/module/es5/Async/waitFor.d.ts +18 -0
- package/module/es5/{Error/retry.js → Async/waitFor.js} +68 -74
- package/module/es5/Date/addDuration.d.ts +15 -0
- package/module/es5/Date/addDuration.js +45 -0
- package/module/es5/Date/diff.d.ts +14 -0
- package/module/es5/Date/diff.js +40 -0
- package/module/es5/Date/durationUnit.d.ts +12 -0
- package/module/es5/Date/durationUnit.js +5 -0
- package/module/es5/Date/endOf.d.ts +13 -0
- package/module/es5/Date/endOf.js +72 -0
- package/module/es5/Date/formatRelative.d.ts +13 -0
- package/module/es5/Date/formatRelative.js +61 -0
- package/module/es5/Date/index.d.ts +10 -0
- package/module/es5/Date/index.js +110 -0
- package/module/es5/Date/isBusinessDay.d.ts +10 -0
- package/module/es5/Date/isBusinessDay.js +26 -0
- package/module/es5/Date/isSameDay.d.ts +10 -0
- package/module/es5/Date/isSameDay.js +18 -0
- package/module/es5/Date/isWeekend.d.ts +9 -0
- package/module/es5/Date/isWeekend.js +18 -0
- package/module/es5/Date/msByUnit.d.ts +2 -0
- package/module/es5/Date/msByUnit.js +15 -0
- package/module/es5/Date/startOf.d.ts +13 -0
- package/module/es5/Date/startOf.js +72 -0
- package/module/es5/Date/subDuration.d.ts +13 -0
- package/module/es5/Date/subDuration.js +21 -0
- package/module/es5/Error/index.d.ts +0 -1
- package/module/es5/Error/index.js +0 -11
- package/module/es5/Object/flattenObject.d.ts +11 -0
- package/module/es5/Object/flattenObject.js +35 -0
- package/module/es5/Object/get.d.ts +1 -0
- package/module/es5/Object/get.js +42 -0
- package/module/es5/Object/has.d.ts +0 -19
- package/module/es5/Object/has.js +4 -4
- package/module/es5/Object/index.d.ts +8 -0
- package/module/es5/Object/index.js +88 -0
- package/module/es5/Object/invert.d.ts +12 -0
- package/module/es5/Object/invert.js +26 -0
- package/module/es5/Object/omitBy.d.ts +11 -0
- package/module/es5/Object/omitBy.js +27 -0
- package/module/es5/Object/pathSegments.d.ts +1 -0
- package/module/es5/Object/pathSegments.js +9 -0
- package/module/es5/Object/pickBy.d.ts +11 -0
- package/module/es5/Object/pickBy.js +27 -0
- package/module/es5/Object/set.d.ts +19 -0
- package/module/es5/Object/set.js +44 -0
- package/module/es5/Object/unflattenObject.d.ts +15 -0
- package/module/es5/Object/unflattenObject.js +30 -0
- package/module/es5/Random/index.d.ts +7 -0
- package/module/es5/Random/index.js +82 -0
- package/module/es5/Random/randomBoolean.d.ts +9 -0
- package/module/es5/Random/randomBoolean.js +18 -0
- package/module/es5/Random/randomChoice.d.ts +9 -0
- package/module/es5/Random/randomChoice.js +18 -0
- package/module/es5/Random/randomFloat.d.ts +9 -0
- package/module/es5/Random/randomFloat.js +17 -0
- package/module/es5/Random/randomInt.d.ts +9 -0
- package/module/es5/Random/randomInt.js +19 -0
- package/module/es5/Random/randomUuid.d.ts +9 -0
- package/module/es5/Random/randomUuid.js +38 -0
- package/module/es5/Random/seededRandom.d.ts +11 -0
- package/module/es5/Random/seededRandom.js +46 -0
- package/module/es5/Random/weightedChoice.d.ts +15 -0
- package/module/es5/Random/weightedChoice.js +50 -0
- package/module/es5/String/capitalize.d.ts +12 -0
- package/module/es5/String/capitalize.js +35 -0
- package/module/es5/String/capitalizeWord.d.ts +1 -0
- package/module/es5/String/capitalizeWord.js +9 -0
- package/module/es5/String/dedent.d.ts +19 -0
- package/module/es5/String/dedent.js +82 -0
- package/module/es5/String/index.d.ts +10 -0
- package/module/es5/String/index.js +110 -0
- package/module/es5/String/mask.d.ts +20 -0
- package/module/es5/String/mask.js +39 -0
- package/module/es5/String/pascalCase.d.ts +9 -0
- package/module/es5/String/pascalCase.js +21 -0
- package/module/es5/String/snakeCase.d.ts +9 -0
- package/module/es5/String/snakeCase.js +20 -0
- package/module/es5/String/titleCase.d.ts +9 -0
- package/module/es5/String/titleCase.js +21 -0
- package/module/es5/String/uncapitalize.d.ts +10 -0
- package/module/es5/String/uncapitalize.js +33 -0
- package/module/es5/String/wordCount.d.ts +10 -0
- package/module/es5/String/wordCount.js +19 -0
- package/module/es5/String/words.d.ts +12 -0
- package/module/es5/String/words.js +25 -0
- package/module/es5/Tool/createPipeline.d.ts +1 -1
- package/module/es5/Tool/createPipeline.js +7 -10
- package/module/es5/URL/buildUrl.d.ts +10 -0
- package/module/es5/URL/buildUrl.js +10 -4
- package/module/es5/URL/parseQueryString.d.ts +6 -0
- package/module/es5/URL/parseQueryString.js +6 -4
- package/module/es5/Validate/object/core.js +0 -1
- package/module/es5/index.d.ts +1 -0
- package/module/es5/index.js +20 -9
- package/module/index.d.ts +1 -0
- package/module/index.js +1 -0
- package/module/index.js.map +1 -1
- package/package.json +30 -25
- package/module/Error/retry.d.ts +0 -37
- package/module/Error/retry.js +0 -47
- package/module/Error/retry.js.map +0 -1
- package/module/es5/Error/retry.d.ts +0 -37
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported duration units for date arithmetic.
|
|
3
|
+
* - ms: milliseconds
|
|
4
|
+
* - s: seconds
|
|
5
|
+
* - m: minutes
|
|
6
|
+
* - h: hours
|
|
7
|
+
* - d: days
|
|
8
|
+
* - w: weeks
|
|
9
|
+
* - M: months (calendar-aware)
|
|
10
|
+
* - y: years (calendar-aware)
|
|
11
|
+
*/
|
|
12
|
+
export type DurationUnit = "ms" | "s" | "m" | "h" | "d" | "w" | "M" | "y";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durationUnit.js","sourceRoot":"","sources":["../../src/Date/durationUnit.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DateBoundaryUnit } from "./startOf";
|
|
2
|
+
/**
|
|
3
|
+
* Returns a new Date set to the end of the given unit.
|
|
4
|
+
* Week ends on Saturday at 23:59:59.999.
|
|
5
|
+
*
|
|
6
|
+
* @param {Date} date - Base date
|
|
7
|
+
* @param {DateBoundaryUnit} unit - Boundary unit
|
|
8
|
+
* @returns {Date} A new Date at the end of the specified unit
|
|
9
|
+
* @example
|
|
10
|
+
* endOf(new Date("2025-04-15T10:30:00"), "day"); // 2025-04-15T23:59:59.999
|
|
11
|
+
* endOf(new Date("2025-04-15"), "month"); // 2025-04-30T23:59:59.999
|
|
12
|
+
*/
|
|
13
|
+
export declare const endOf: (date: Date, unit: DateBoundaryUnit) => Date;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a new Date set to the end of the given unit.
|
|
3
|
+
* Week ends on Saturday at 23:59:59.999.
|
|
4
|
+
*
|
|
5
|
+
* @param {Date} date - Base date
|
|
6
|
+
* @param {DateBoundaryUnit} unit - Boundary unit
|
|
7
|
+
* @returns {Date} A new Date at the end of the specified unit
|
|
8
|
+
* @example
|
|
9
|
+
* endOf(new Date("2025-04-15T10:30:00"), "day"); // 2025-04-15T23:59:59.999
|
|
10
|
+
* endOf(new Date("2025-04-15"), "month"); // 2025-04-30T23:59:59.999
|
|
11
|
+
*/
|
|
12
|
+
export const endOf = (date, unit) => {
|
|
13
|
+
const result = new Date(date);
|
|
14
|
+
switch (unit) {
|
|
15
|
+
case "second": {
|
|
16
|
+
result.setMilliseconds(999);
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
case "minute": {
|
|
20
|
+
result.setSeconds(59, 999);
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
case "hour": {
|
|
24
|
+
result.setMinutes(59, 59, 999);
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
case "day": {
|
|
28
|
+
result.setHours(23, 59, 59, 999);
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
case "week": {
|
|
32
|
+
const dayOfWeek = result.getDay();
|
|
33
|
+
result.setDate(result.getDate() + (6 - dayOfWeek));
|
|
34
|
+
result.setHours(23, 59, 59, 999);
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
case "month": {
|
|
38
|
+
result.setMonth(result.getMonth() + 1, 0);
|
|
39
|
+
result.setHours(23, 59, 59, 999);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
case "quarter": {
|
|
43
|
+
const quarterEndMonth = Math.floor(result.getMonth() / 3) * 3 + 2;
|
|
44
|
+
result.setMonth(quarterEndMonth + 1, 0);
|
|
45
|
+
result.setHours(23, 59, 59, 999);
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
case "year": {
|
|
49
|
+
result.setMonth(11, 31);
|
|
50
|
+
result.setHours(23, 59, 59, 999);
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
default: {
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
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ACb,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;YACjC,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAClE,MAAM,CAAC,QAAQ,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;YACjC,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACxB,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;YACjC,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a date relative to a base date using Intl.RelativeTimeFormat.
|
|
3
|
+
* Picks the largest unit that fits the absolute delta.
|
|
4
|
+
*
|
|
5
|
+
* @param {Date} date - The target date
|
|
6
|
+
* @param {Date} [baseDate=new Date()] - Reference date (defaults to now)
|
|
7
|
+
* @param {string} [locale] - BCP 47 locale tag; uses system locale if omitted
|
|
8
|
+
* @returns {string} Localized relative-time string
|
|
9
|
+
* @example
|
|
10
|
+
* formatRelative(new Date(Date.now() - 3600_000), new Date(), "en"); // "1 hour ago"
|
|
11
|
+
* formatRelative(new Date(Date.now() + 86_400_000), new Date(), "ja"); // "1 日後"
|
|
12
|
+
*/
|
|
13
|
+
export declare const formatRelative: (date: Date, baseDate?: Date, locale?: string) => string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OneDayMs, OneHourMs, OneMinuteMs, OneMonthMs, OneSecondMs, OneWeekMs, OneYearMs, } from "../Consts/clock";
|
|
2
|
+
const THRESHOLDS = [
|
|
3
|
+
{ unit: "year", ms: OneYearMs },
|
|
4
|
+
{ unit: "month", ms: OneMonthMs },
|
|
5
|
+
{ unit: "week", ms: OneWeekMs },
|
|
6
|
+
{ unit: "day", ms: OneDayMs },
|
|
7
|
+
{ unit: "hour", ms: OneHourMs },
|
|
8
|
+
{ unit: "minute", ms: OneMinuteMs },
|
|
9
|
+
{ unit: "second", ms: OneSecondMs },
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Formats a date relative to a base date using Intl.RelativeTimeFormat.
|
|
13
|
+
* Picks the largest unit that fits the absolute delta.
|
|
14
|
+
*
|
|
15
|
+
* @param {Date} date - The target date
|
|
16
|
+
* @param {Date} [baseDate=new Date()] - Reference date (defaults to now)
|
|
17
|
+
* @param {string} [locale] - BCP 47 locale tag; uses system locale if omitted
|
|
18
|
+
* @returns {string} Localized relative-time string
|
|
19
|
+
* @example
|
|
20
|
+
* formatRelative(new Date(Date.now() - 3600_000), new Date(), "en"); // "1 hour ago"
|
|
21
|
+
* formatRelative(new Date(Date.now() + 86_400_000), new Date(), "ja"); // "1 日後"
|
|
22
|
+
*/
|
|
23
|
+
export const formatRelative = (date, baseDate = new Date(), locale) => {
|
|
24
|
+
const deltaMs = date.getTime() - baseDate.getTime();
|
|
25
|
+
const absDelta = Math.abs(deltaMs);
|
|
26
|
+
const formatter = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
|
|
27
|
+
for (const { unit, ms } of THRESHOLDS) {
|
|
28
|
+
if (absDelta >= ms) {
|
|
29
|
+
const value = Math.round(deltaMs / ms);
|
|
30
|
+
return formatter.format(value, unit);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return formatter.format(0, "second");
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=formatRelative.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatRelative.js","sourceRoot":"","sources":["../../src/Date/formatRelative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS,EACT,SAAS,GACV,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,GAAwD;IACtE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE;IACjC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC7B,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE;IACnC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE;CACpC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAU,EACV,WAAiB,IAAI,IAAI,EAAE,EAC3B,MAAe,EACP,EAAE;IACV,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;IACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IAE3E,KAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,UAAU,EAAE,CAAC;QACtC,IAAI,QAAQ,IAAI,EAAE,EAAE,CAAC;YACnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;YACvC,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC,CAAC"}
|
package/module/Date/index.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
export * from "./addDuration";
|
|
1
2
|
export * from "./birthday";
|
|
2
3
|
export * from "./dateRange";
|
|
3
4
|
export * from "./dayOfWeek";
|
|
5
|
+
export * from "./diff";
|
|
6
|
+
export * from "./durationUnit";
|
|
7
|
+
export * from "./endOf";
|
|
4
8
|
export * from "./format";
|
|
9
|
+
export * from "./formatRelative";
|
|
5
10
|
export * from "./getDay";
|
|
6
11
|
export * from "./getTimezoneOffsetString";
|
|
12
|
+
export * from "./isBusinessDay";
|
|
7
13
|
export * from "./isLeapYear";
|
|
14
|
+
export * from "./isSameDay";
|
|
15
|
+
export * from "./isWeekend";
|
|
8
16
|
export * from "./new";
|
|
9
17
|
export * from "./now";
|
|
18
|
+
export * from "./startOf";
|
|
19
|
+
export * from "./subDuration";
|
package/module/Date/index.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
export * from "./addDuration";
|
|
1
2
|
export * from "./birthday";
|
|
2
3
|
export * from "./dateRange";
|
|
3
4
|
export * from "./dayOfWeek";
|
|
5
|
+
export * from "./diff";
|
|
6
|
+
export * from "./durationUnit";
|
|
7
|
+
export * from "./endOf";
|
|
4
8
|
export * from "./format";
|
|
9
|
+
export * from "./formatRelative";
|
|
5
10
|
export * from "./getDay";
|
|
6
11
|
export * from "./getTimezoneOffsetString";
|
|
12
|
+
export * from "./isBusinessDay";
|
|
7
13
|
export * from "./isLeapYear";
|
|
14
|
+
export * from "./isSameDay";
|
|
15
|
+
export * from "./isWeekend";
|
|
8
16
|
export * from "./new";
|
|
9
17
|
export * from "./now";
|
|
18
|
+
export * from "./startOf";
|
|
19
|
+
export * from "./subDuration";
|
|
10
20
|
//# sourceMappingURL=index.js.map
|
package/module/Date/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Date/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Date/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true when the given date is a weekday and not in the holidays list.
|
|
3
|
+
* @param {Date} date - The date to check
|
|
4
|
+
* @param {Date[]} [holidays=[]] - Optional list of holiday dates
|
|
5
|
+
* @returns {boolean} True when weekday and not a listed holiday
|
|
6
|
+
* @example
|
|
7
|
+
* isBusinessDay(new Date("2025-04-21")); // true (Monday)
|
|
8
|
+
* isBusinessDay(new Date("2025-04-21"), [new Date("2025-04-21")]); // false
|
|
9
|
+
*/
|
|
10
|
+
export declare const isBusinessDay: (date: Date, holidays?: Date[]) => boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isSameDay } from "./isSameDay";
|
|
2
|
+
import { isWeekend } from "./isWeekend";
|
|
3
|
+
/**
|
|
4
|
+
* Returns true when the given date is a weekday and not in the holidays list.
|
|
5
|
+
* @param {Date} date - The date to check
|
|
6
|
+
* @param {Date[]} [holidays=[]] - Optional list of holiday dates
|
|
7
|
+
* @returns {boolean} True when weekday and not a listed holiday
|
|
8
|
+
* @example
|
|
9
|
+
* isBusinessDay(new Date("2025-04-21")); // true (Monday)
|
|
10
|
+
* isBusinessDay(new Date("2025-04-21"), [new Date("2025-04-21")]); // false
|
|
11
|
+
*/
|
|
12
|
+
export const isBusinessDay = (date, holidays = []) => {
|
|
13
|
+
if (isWeekend(date)) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return !holidays.some((holiday) => isSameDay(holiday, date));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=isBusinessDay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBusinessDay.js","sourceRoot":"","sources":["../../src/Date/isBusinessDay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAU,EAAE,WAAmB,EAAE,EAAW,EAAE;IAC1E,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAC/D,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true when two dates represent the same calendar day in local time.
|
|
3
|
+
* @param {Date} left - First date
|
|
4
|
+
* @param {Date} right - Second date
|
|
5
|
+
* @returns {boolean} True if same year/month/day in local time
|
|
6
|
+
* @example
|
|
7
|
+
* isSameDay(new Date("2025-04-15T01:00"), new Date("2025-04-15T23:00")); // true
|
|
8
|
+
* isSameDay(new Date("2025-04-15"), new Date("2025-04-16")); // false
|
|
9
|
+
*/
|
|
10
|
+
export declare const isSameDay: (left: Date, right: Date) => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true when two dates represent the same calendar day in local time.
|
|
3
|
+
* @param {Date} left - First date
|
|
4
|
+
* @param {Date} right - Second date
|
|
5
|
+
* @returns {boolean} True if same year/month/day in local time
|
|
6
|
+
* @example
|
|
7
|
+
* isSameDay(new Date("2025-04-15T01:00"), new Date("2025-04-15T23:00")); // true
|
|
8
|
+
* isSameDay(new Date("2025-04-15"), new Date("2025-04-16")); // false
|
|
9
|
+
*/
|
|
10
|
+
export const isSameDay = (left, right) => left.getFullYear() === right.getFullYear() &&
|
|
11
|
+
left.getMonth() === right.getMonth() &&
|
|
12
|
+
left.getDate() === right.getDate();
|
|
13
|
+
//# sourceMappingURL=isSameDay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameDay.js","sourceRoot":"","sources":["../../src/Date/isSameDay.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAU,EAAE,KAAW,EAAW,EAAE,CAC5D,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE;IAC1C,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE;IACpC,IAAI,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true when the given date is Saturday or Sunday.
|
|
3
|
+
* @param {Date} date - The date to check
|
|
4
|
+
* @returns {boolean} True if Saturday or Sunday, false otherwise
|
|
5
|
+
* @example
|
|
6
|
+
* isWeekend(new Date("2025-04-19")); // true (Saturday)
|
|
7
|
+
* isWeekend(new Date("2025-04-21")); // false (Monday)
|
|
8
|
+
*/
|
|
9
|
+
export declare const isWeekend: (date: Date) => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true when the given date is Saturday or Sunday.
|
|
3
|
+
* @param {Date} date - The date to check
|
|
4
|
+
* @returns {boolean} True if Saturday or Sunday, false otherwise
|
|
5
|
+
* @example
|
|
6
|
+
* isWeekend(new Date("2025-04-19")); // true (Saturday)
|
|
7
|
+
* isWeekend(new Date("2025-04-21")); // false (Monday)
|
|
8
|
+
*/
|
|
9
|
+
export const isWeekend = (date) => {
|
|
10
|
+
const dayOfWeek = date.getDay();
|
|
11
|
+
return dayOfWeek === 0 || dayOfWeek === 6;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=isWeekend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isWeekend.js","sourceRoot":"","sources":["../../src/Date/isWeekend.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAU,EAAW,EAAE;IAC/C,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAChC,OAAO,SAAS,KAAK,CAAC,IAAI,SAAS,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msByUnit.js","sourceRoot":"","sources":["../../src/Date/msByUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,GACV,MAAM,iBAAiB,CAAC;AAIzB,MAAM,CAAC,MAAM,QAAQ,GAA0C;IAC7D,EAAE,EAAE,CAAC;IACL,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,SAAS;CACb,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type DateBoundaryUnit = "second" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year";
|
|
2
|
+
/**
|
|
3
|
+
* Returns a new Date set to the start of the given unit.
|
|
4
|
+
* Week start is Sunday (day 0).
|
|
5
|
+
*
|
|
6
|
+
* @param {Date} date - Base date
|
|
7
|
+
* @param {DateBoundaryUnit} unit - Boundary unit
|
|
8
|
+
* @returns {Date} A new Date at the start of the specified unit
|
|
9
|
+
* @example
|
|
10
|
+
* startOf(new Date("2025-04-15T10:30:00"), "day"); // 2025-04-15T00:00:00
|
|
11
|
+
* startOf(new Date("2025-04-15"), "month"); // 2025-04-01T00:00:00
|
|
12
|
+
*/
|
|
13
|
+
export declare const startOf: (date: Date, unit: DateBoundaryUnit) => Date;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a new Date set to the start of the given unit.
|
|
3
|
+
* Week start is Sunday (day 0).
|
|
4
|
+
*
|
|
5
|
+
* @param {Date} date - Base date
|
|
6
|
+
* @param {DateBoundaryUnit} unit - Boundary unit
|
|
7
|
+
* @returns {Date} A new Date at the start of the specified unit
|
|
8
|
+
* @example
|
|
9
|
+
* startOf(new Date("2025-04-15T10:30:00"), "day"); // 2025-04-15T00:00:00
|
|
10
|
+
* startOf(new Date("2025-04-15"), "month"); // 2025-04-01T00:00:00
|
|
11
|
+
*/
|
|
12
|
+
export const startOf = (date, unit) => {
|
|
13
|
+
const result = new Date(date);
|
|
14
|
+
switch (unit) {
|
|
15
|
+
case "second": {
|
|
16
|
+
result.setMilliseconds(0);
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
case "minute": {
|
|
20
|
+
result.setSeconds(0, 0);
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
case "hour": {
|
|
24
|
+
result.setMinutes(0, 0, 0);
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
case "day": {
|
|
28
|
+
result.setHours(0, 0, 0, 0);
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
case "week": {
|
|
32
|
+
const dayOfWeek = result.getDay();
|
|
33
|
+
result.setDate(result.getDate() - dayOfWeek);
|
|
34
|
+
result.setHours(0, 0, 0, 0);
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
case "month": {
|
|
38
|
+
result.setDate(1);
|
|
39
|
+
result.setHours(0, 0, 0, 0);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
case "quarter": {
|
|
43
|
+
const quarterStartMonth = Math.floor(result.getMonth() / 3) * 3;
|
|
44
|
+
result.setMonth(quarterStartMonth, 1);
|
|
45
|
+
result.setHours(0, 0, 0, 0);
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
case "year": {
|
|
49
|
+
result.setMonth(0, 1);
|
|
50
|
+
result.setHours(0, 0, 0, 0);
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
default: {
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=startOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startOf.js","sourceRoot":"","sources":["../../src/Date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AAO,MAAM,CAAC;QAChB,CAAC;QACD,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YAChE,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC5B,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC5B,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DurationUnit } from "./durationUnit";
|
|
2
|
+
/**
|
|
3
|
+
* Subtracts a duration from a date and returns a new Date.
|
|
4
|
+
* Equivalent to addDuration(date, -amount, unit).
|
|
5
|
+
*
|
|
6
|
+
* @param {Date} date - Base date
|
|
7
|
+
* @param {number} amount - Amount to subtract
|
|
8
|
+
* @param {DurationUnit} unit - Unit of the amount
|
|
9
|
+
* @returns {Date} A new Date with the duration subtracted
|
|
10
|
+
* @example
|
|
11
|
+
* subDuration(new Date("2025-03-31"), 1, "M"); // 2025-02-28
|
|
12
|
+
*/
|
|
13
|
+
export declare const subDuration: (date: Date, amount: number, unit: DurationUnit) => Date;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { addDuration } from "./addDuration";
|
|
2
|
+
/**
|
|
3
|
+
* Subtracts a duration from a date and returns a new Date.
|
|
4
|
+
* Equivalent to addDuration(date, -amount, unit).
|
|
5
|
+
*
|
|
6
|
+
* @param {Date} date - Base date
|
|
7
|
+
* @param {number} amount - Amount to subtract
|
|
8
|
+
* @param {DurationUnit} unit - Unit of the amount
|
|
9
|
+
* @returns {Date} A new Date with the duration subtracted
|
|
10
|
+
* @example
|
|
11
|
+
* subDuration(new Date("2025-03-31"), 1, "M"); // 2025-02-28
|
|
12
|
+
*/
|
|
13
|
+
export const subDuration = (date, amount, unit) => addDuration(date, -amount, unit);
|
|
14
|
+
//# sourceMappingURL=subDuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subDuration.js","sourceRoot":"","sources":["../../src/Date/subDuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,IAAU,EACV,MAAc,EACd,IAAkB,EACZ,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC"}
|
package/module/Error/index.d.ts
CHANGED
package/module/Error/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Error/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Error/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepClone.js","sourceRoot":"","sources":["../../src/Object/deepClone.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,GAAG,CA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,GAAG,CAAC,CAAC,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,KAAK,YAAY,GAAG,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACzB,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,eAAe;IACf,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CACrB,KAAiC,CAAC,GAAG,CAAC,EACvC,KAAK,GAAG,CAAC,CACV,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,KAAQ,EAAK,EAAE;IAC1C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,UAAU,CAAC,KAAK,EAAE,CAAC,CAAM,CAAC;AACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively flattens a nested plain object into a single-level object
|
|
3
|
+
* keyed by joined paths. Arrays and non-plain objects are kept as-is.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} object - Source nested object
|
|
6
|
+
* @param {string} [separator="."] - Separator used to join path segments
|
|
7
|
+
* @returns {Record<string, unknown>} A flat object
|
|
8
|
+
* @example
|
|
9
|
+
* flattenObject({ a: { b: { c: 1 } }, d: 2 }); // { "a.b.c": 1, d: 2 }
|
|
10
|
+
*/
|
|
11
|
+
export declare const flattenObject: <T extends Record<string, unknown>>(object: T, separator?: string) => Record<string, unknown>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isPlainObject } from "./isPlainObject";
|
|
2
|
+
/**
|
|
3
|
+
* Recursively flattens a nested plain object into a single-level object
|
|
4
|
+
* keyed by joined paths. Arrays and non-plain objects are kept as-is.
|
|
5
|
+
*
|
|
6
|
+
* @param {Record<string, unknown>} object - Source nested object
|
|
7
|
+
* @param {string} [separator="."] - Separator used to join path segments
|
|
8
|
+
* @returns {Record<string, unknown>} A flat object
|
|
9
|
+
* @example
|
|
10
|
+
* flattenObject({ a: { b: { c: 1 } }, d: 2 }); // { "a.b.c": 1, d: 2 }
|
|
11
|
+
*/
|
|
12
|
+
export const flattenObject = (object, separator = ".") => {
|
|
13
|
+
const result = {};
|
|
14
|
+
const walk = (current, prefix) => {
|
|
15
|
+
for (const key of Object.keys(current)) {
|
|
16
|
+
const value = current[key];
|
|
17
|
+
const nextKey = prefix ? `${prefix}${separator}${key}` : key;
|
|
18
|
+
if (isPlainObject(value) && Object.keys(value).length > 0) {
|
|
19
|
+
walk(value, nextKey);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
result[nextKey] = value;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
walk(object, "");
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=flattenObject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flattenObject.js","sourceRoot":"","sources":["../../src/Object/flattenObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAS,EACT,SAAS,GAAG,GAAG,EACU,EAAE;IAC3B,MAAM,MAAM,GAA4B,EAAE,CAAC;IAE3C,MAAM,IAAI,GAAG,CAAC,OAAgC,EAAE,MAAc,EAAQ,EAAE;QACtE,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACvC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAC3B,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;YAC7D,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1D,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const get: <T>(object: unknown, path: string | string[], defaultValue?: T) => T | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a deeply nested property by string or string-array path.
|
|
3
|
+
* Returns the default value if any segment is missing.
|
|
4
|
+
*
|
|
5
|
+
* @template T - Expected return type
|
|
6
|
+
* @param {unknown} object - Source object
|
|
7
|
+
* @param {string | string[]} path - Dot-separated string or path segments array
|
|
8
|
+
* @param {T} [defaultValue] - Returned when the path resolves to undefined or is missing
|
|
9
|
+
* @returns {T | undefined} The resolved value, or defaultValue when missing
|
|
10
|
+
* @example
|
|
11
|
+
* get({ a: { b: { c: 1 } } }, "a.b.c"); // 1
|
|
12
|
+
* get({ a: { b: 1 } }, ["a", "x"], 0); // 0
|
|
13
|
+
*/
|
|
14
|
+
import { pathSegments } from "./pathSegments";
|
|
15
|
+
export const get = (object, path, defaultValue) => {
|
|
16
|
+
const segments = pathSegments(path);
|
|
17
|
+
let current = object;
|
|
18
|
+
for (const key of segments) {
|
|
19
|
+
if (current == null) {
|
|
20
|
+
return defaultValue;
|
|
21
|
+
}
|
|
22
|
+
current = current[key];
|
|
23
|
+
}
|
|
24
|
+
return (current === undefined ? defaultValue : current);
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/Object/get.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,GAAG,GAAG,CACjB,MAAe,EACf,IAAuB,EACvB,YAAgB,EACD,EAAE;IACjB,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,OAAO,GAAY,MAAM,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpB,OAAO,YAAY,CAAC;QACtB,CAAC;QACD,OAAO,GAAI,OAAmC,CAAC,GAAG,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAkB,CAAC;AAC3E,CAAC,CAAC"}
|
package/module/Object/has.d.ts
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines if an object has a specified path
|
|
3
|
-
* @param {T} object - Object to check
|
|
4
|
-
* @param {string | string[]} path - Path to check
|
|
5
|
-
* @returns {boolean} Returns true if path exists, false otherwise
|
|
6
|
-
* @example has({ a: { b: 1 } }, "a.b"); // true
|
|
7
|
-
* has({ a: { b: 1 } }, ["a", "b"]); // true
|
|
8
|
-
* has({ a: { b: 1 } }, "a.c"); // false
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* **Prototype pollution warning:** This function does not filter out
|
|
12
|
-
* prototype-polluting keys (`__proto__`, `constructor`, `prototype`).
|
|
13
|
-
* If processing user-controlled input, sanitize with the appropriate
|
|
14
|
-
* `removePrototype*` helper before calling this function:
|
|
15
|
-
* - `removePrototype` — shallow sanitization of a single object
|
|
16
|
-
* - `removePrototypeDeep` — recursive sanitization of a single object (for deeply nested data)
|
|
17
|
-
* - `removePrototypeMap` — shallow sanitization of an array of objects
|
|
18
|
-
* - `removePrototypeMapDeep` — recursive sanitization of an array of objects (for deeply nested data)
|
|
19
|
-
*/
|
|
20
1
|
export declare const has: <T extends {
|
|
21
2
|
[key: string]: unknown;
|
|
22
3
|
}>(object: T, path: string | string[]) => boolean;
|
package/module/Object/has.js
CHANGED
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
* - `removePrototypeMap` — shallow sanitization of an array of objects
|
|
18
18
|
* - `removePrototypeMapDeep` — recursive sanitization of an array of objects (for deeply nested data)
|
|
19
19
|
*/
|
|
20
|
+
import { pathSegments } from "./pathSegments";
|
|
20
21
|
export const has = (object, path) => {
|
|
21
|
-
const
|
|
22
|
+
const segments = pathSegments(path);
|
|
22
23
|
let current = object;
|
|
23
|
-
for (const key of
|
|
24
|
-
if (current == null ||
|
|
25
|
-
!Object.hasOwn(current, key)) {
|
|
24
|
+
for (const key of segments) {
|
|
25
|
+
if (current == null || !Object.hasOwn(current, key)) {
|
|
26
26
|
return false;
|
|
27
27
|
}
|
|
28
28
|
current = current[key];
|
package/module/Object/has.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has.js","sourceRoot":"","sources":["../../src/Object/has.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CACjB,MAAS,EACT,IAAuB,EACd,EAAE;IACX,MAAM,
|
|
1
|
+
{"version":3,"file":"has.js","sourceRoot":"","sources":["../../src/Object/has.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,GAAG,GAAG,CACjB,MAAS,EACT,IAAuB,EACd,EAAE;IACX,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,OAAO,GAAY,MAAM,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,IAAI,OAAO,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,GAAI,OAAmC,CAAC,GAAG,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
package/module/Object/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export * from "./deepClone";
|
|
2
|
+
export * from "./flattenObject";
|
|
3
|
+
export * from "./get";
|
|
2
4
|
export * from "./getObjectsCommon";
|
|
3
5
|
export * from "./getObjectsDiff";
|
|
4
6
|
export * from "./has";
|
|
7
|
+
export * from "./invert";
|
|
5
8
|
export * from "./isEmpty";
|
|
6
9
|
export * from "./isPlainObject";
|
|
7
10
|
export * from "./keyBy";
|
|
@@ -10,9 +13,14 @@ export * from "./mapValues";
|
|
|
10
13
|
export * from "./merge";
|
|
11
14
|
export * from "./mergeDeep";
|
|
12
15
|
export * from "./omit";
|
|
16
|
+
export * from "./omitBy";
|
|
17
|
+
export * from "./pathSegments";
|
|
13
18
|
export * from "./pick";
|
|
19
|
+
export * from "./pickBy";
|
|
14
20
|
export * from "./pickDeep";
|
|
15
21
|
export * from "./removePrototype";
|
|
16
22
|
export * from "./removePrototypeDeep";
|
|
17
23
|
export * from "./removePrototypeMap";
|
|
18
24
|
export * from "./removePrototypeMapDeep";
|
|
25
|
+
export * from "./set";
|
|
26
|
+
export * from "./unflattenObject";
|