@forthtilliath/ts-kit 0.11.0 → 0.12.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 +28 -0
- package/dist/array/index.d.ts +1 -0
- package/dist/array/index.d.ts.map +1 -1
- package/dist/array/index.js +1 -0
- package/dist/array/shuffle.d.ts +14 -0
- package/dist/array/shuffle.d.ts.map +1 -0
- package/dist/array/shuffle.js +20 -0
- package/dist/date/formatRecentDate.d.ts +22 -0
- package/dist/date/formatRecentDate.d.ts.map +1 -0
- package/dist/date/formatRecentDate.js +46 -0
- package/dist/date/index.d.ts +4 -0
- package/dist/date/index.d.ts.map +1 -1
- package/dist/date/index.js +4 -0
- package/dist/date/mondayFirstWeekday.d.ts +12 -0
- package/dist/date/mondayFirstWeekday.d.ts.map +1 -0
- package/dist/date/mondayFirstWeekday.js +15 -0
- package/dist/date/parseIsoDate.d.ts +12 -0
- package/dist/date/parseIsoDate.d.ts.map +1 -0
- package/dist/date/parseIsoDate.js +13 -0
- package/dist/date/parseSqliteDate.d.ts +13 -0
- package/dist/date/parseSqliteDate.d.ts.map +1 -0
- package/dist/date/parseSqliteDate.js +17 -0
- package/dist/files/formatFileTimestamp.d.ts +22 -0
- package/dist/files/formatFileTimestamp.d.ts.map +1 -0
- package/dist/files/formatFileTimestamp.js +20 -0
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.d.ts.map +1 -1
- package/dist/files/index.js +1 -0
- package/dist/ics/escapeIcsText.d.ts +12 -0
- package/dist/ics/escapeIcsText.d.ts.map +1 -0
- package/dist/ics/escapeIcsText.js +17 -0
- package/dist/ics/foldIcsLine.d.ts +15 -0
- package/dist/ics/foldIcsLine.d.ts.map +1 -0
- package/dist/ics/foldIcsLine.js +40 -0
- package/dist/ics/icsTimestamp.d.ts +10 -0
- package/dist/ics/icsTimestamp.d.ts.map +1 -0
- package/dist/ics/icsTimestamp.js +11 -0
- package/dist/ics/index.d.ts +6 -0
- package/dist/ics/index.d.ts.map +1 -0
- package/dist/ics/index.js +5 -0
- package/dist/ics/toIcsDate.d.ts +11 -0
- package/dist/ics/toIcsDate.d.ts.map +1 -0
- package/dist/ics/toIcsDate.js +12 -0
- package/dist/ics/toIcsDateTime.d.ts +13 -0
- package/dist/ics/toIcsDateTime.d.ts.map +1 -0
- package/dist/ics/toIcsDateTime.js +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -63,6 +63,8 @@ Importing them is harmless anywhere: the DOM is only touched when called.
|
|
|
63
63
|
- `rankByNameMatch(items, query, getName)` — ranks `items` by relevance to
|
|
64
64
|
`query`: earlier match position first, then shorter name — for a
|
|
65
65
|
search-as-you-type list.
|
|
66
|
+
- `shuffle(array, random?)` — shuffled copy (Fisher–Yates); `random`
|
|
67
|
+
(default `Math.random`) can be swapped for a seeded generator in tests.
|
|
66
68
|
- `sortUpcomingFirst(items, getDates, { now? })` — upcoming items first
|
|
67
69
|
(nearest first), then past ones (most recent first), undated last — for a
|
|
68
70
|
list of events. An item may carry several dates: it stays upcoming while
|
|
@@ -134,8 +136,18 @@ Importing them is harmless anywhere: the DOM is only touched when called.
|
|
|
134
136
|
|
|
135
137
|
- `startOfDay(date?)` — returns a new `Date` at local midnight.
|
|
136
138
|
- `isSameDay(a, b)` — checks whether two dates fall on the same local day.
|
|
139
|
+
- `parseIsoDate(iso)` — a `YYYY-MM-DD` calendar date as **local** midnight
|
|
140
|
+
(`new Date("2026-03-14")` is UTC midnight, the previous day in the Americas).
|
|
141
|
+
- `parseSqliteDate(value)` — reads a SQLite `current_timestamp` value
|
|
142
|
+
(`"2026-10-09 19:46:00"`, UTC without a zone marker) as **UTC** instead of
|
|
143
|
+
local time; full ISO strings are read as they are.
|
|
144
|
+
- `mondayFirstWeekday(date)` — weekday index with Monday = `0` … Sunday = `6`,
|
|
145
|
+
from a `Date` or a `YYYY-MM-DD` string; offsets a Monday-first month grid.
|
|
137
146
|
- `formatRelativeTime(date, baseDate?, locale?)` — human-readable relative
|
|
138
147
|
time ("3 hours ago"), backed by `Intl.RelativeTimeFormat`.
|
|
148
|
+
- `formatRecentDate(date, { now?, locale? })` — a past moment as a "last
|
|
149
|
+
saved…" line reads best: `"aujourd'hui à 21:42"`, `"hier à 08:05"`, then
|
|
150
|
+
`"le 11 octobre 2026"` (`locale: "en"`: `"today at…"`, `"on October 11, 2026"`).
|
|
139
151
|
- `getPeriodStartMs(period, now?)` — start timestamp (ms) for a
|
|
140
152
|
`"today" | "7d" | "30d" | "all"` period filter, or `null` for `"all"`.
|
|
141
153
|
`"today"` is the current calendar day, not a rolling 24h window.
|
|
@@ -156,6 +168,9 @@ Importing them is harmless anywhere: the DOM is only touched when called.
|
|
|
156
168
|
- `downloadTextBlob(filename, text)` — same, but via a `Blob` + object URL
|
|
157
169
|
(better for larger content). The object URL is revoked 40 s later, not
|
|
158
170
|
right after the click (which can cancel the download in Firefox/Safari).
|
|
171
|
+
- `formatFileTimestamp(date?, { seconds?, separator? })` — compact **local**
|
|
172
|
+
timestamp for file names, `"20261008-0902"` by default (`toISOString()` is
|
|
173
|
+
UTC and its `:` is rejected by Windows); names sort chronologically.
|
|
159
174
|
|
|
160
175
|
### `function`
|
|
161
176
|
|
|
@@ -167,6 +182,19 @@ Importing them is harmless anywhere: the DOM is only touched when called.
|
|
|
167
182
|
- `sanitizeFileName(name)` — replaces characters forbidden in file names
|
|
168
183
|
(`\ / : * ? " < > |`) with hyphens, collapses whitespace and trims.
|
|
169
184
|
|
|
185
|
+
### `ics`
|
|
186
|
+
|
|
187
|
+
Building blocks for writing an iCalendar (`.ics`, RFC 5545) file.
|
|
188
|
+
|
|
189
|
+
- `escapeIcsText(text)` — escapes a TEXT value (`SUMMARY`, `DESCRIPTION`…):
|
|
190
|
+
`\`, `;`, `,` and line breaks.
|
|
191
|
+
- `foldIcsLine(line, maxOctets?)` — folds a content line past 75 **octets**
|
|
192
|
+
(UTF-8 bytes, not characters) without splitting a character.
|
|
193
|
+
- `toIcsDate(isoDate)` — `"2026-07-14"` → `"20260714"`, for all-day events.
|
|
194
|
+
- `toIcsDateTime(isoDate, "HH:MM")` — floating local date-time,
|
|
195
|
+
`"20260714T063000"`.
|
|
196
|
+
- `icsTimestamp(date?)` — UTC date-time for `DTSTAMP`, `"20260714T080509Z"`.
|
|
197
|
+
|
|
170
198
|
### `id`
|
|
171
199
|
|
|
172
200
|
- `randomId()` — `crypto.randomUUID()` with fallbacks for older/insecure
|
package/dist/array/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./flattenDeep.js";
|
|
|
4
4
|
export * from "./getMostRecentIds.js";
|
|
5
5
|
export * from "./nextInCycle.js";
|
|
6
6
|
export * from "./rankByNameMatch.js";
|
|
7
|
+
export * from "./shuffle.js";
|
|
7
8
|
export * from "./sortUpcomingFirst.js";
|
|
8
9
|
export * from "./swapItems.js";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/array/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/array/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC"}
|
package/dist/array/index.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a shuffled copy of an array (Fisher–Yates), leaving the original
|
|
3
|
+
* untouched.
|
|
4
|
+
*
|
|
5
|
+
* @param array - The array to shuffle.
|
|
6
|
+
* @param random - Returns a number in `[0, 1)`. Defaults to `Math.random`;
|
|
7
|
+
* pass a seeded generator for deterministic tests.
|
|
8
|
+
* @returns A new array holding the same elements in random order.
|
|
9
|
+
* @example
|
|
10
|
+
* shuffle([1, 2, 3, 4]); // => e.g. [3, 1, 4, 2]
|
|
11
|
+
* shuffle(["a", "b", "c"], () => 0); // => ["b", "c", "a"]
|
|
12
|
+
*/
|
|
13
|
+
export declare function shuffle<T>(array: readonly T[], random?: () => number): T[];
|
|
14
|
+
//# sourceMappingURL=shuffle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../../src/array/shuffle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,MAAM,GAAE,MAAM,MAAoB,GACjC,CAAC,EAAE,CAOL"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a shuffled copy of an array (Fisher–Yates), leaving the original
|
|
3
|
+
* untouched.
|
|
4
|
+
*
|
|
5
|
+
* @param array - The array to shuffle.
|
|
6
|
+
* @param random - Returns a number in `[0, 1)`. Defaults to `Math.random`;
|
|
7
|
+
* pass a seeded generator for deterministic tests.
|
|
8
|
+
* @returns A new array holding the same elements in random order.
|
|
9
|
+
* @example
|
|
10
|
+
* shuffle([1, 2, 3, 4]); // => e.g. [3, 1, 4, 2]
|
|
11
|
+
* shuffle(["a", "b", "c"], () => 0); // => ["b", "c", "a"]
|
|
12
|
+
*/
|
|
13
|
+
export function shuffle(array, random = Math.random) {
|
|
14
|
+
const result = [...array];
|
|
15
|
+
for (let i = result.length - 1; i > 0; i--) {
|
|
16
|
+
const j = Math.floor(random() * (i + 1));
|
|
17
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Languages {@link formatRecentDate} has wording for. */
|
|
2
|
+
export type RecentDateLocale = "fr" | "en";
|
|
3
|
+
export interface FormatRecentDateOptions {
|
|
4
|
+
/** Reference "now" (defaults to the current time). */
|
|
5
|
+
now?: Date;
|
|
6
|
+
/** Wording and `Intl` formats. @defaultValue "fr" */
|
|
7
|
+
locale?: RecentDateLocale;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Describes a past moment the way a "last saved…" line reads best: with the
|
|
11
|
+
* time when it's today or yesterday, as a plain day otherwise. A date in the
|
|
12
|
+
* future (clock change between devices) reads as today.
|
|
13
|
+
*
|
|
14
|
+
* @param date - The moment to describe.
|
|
15
|
+
* @param options - See {@link FormatRecentDateOptions}.
|
|
16
|
+
* @returns E.g. `"aujourd'hui à 21:42"`, `"hier à 08:05"`, `"le 11 octobre 2026"`.
|
|
17
|
+
* @example
|
|
18
|
+
* formatRecentDate(lastBackupAt); // => "hier à 21:42"
|
|
19
|
+
* formatRecentDate(lastBackupAt, { locale: "en" }); // => "yesterday at 9:42 PM"
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatRecentDate(date: Date, { now, locale }?: FormatRecentDateOptions): string;
|
|
22
|
+
//# sourceMappingURL=formatRecentDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatRecentDate.d.ts","sourceRoot":"","sources":["../../src/date/formatRecentDate.ts"],"names":[],"mappings":"AAEA,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,qDAAqD;IACrD,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AA2BD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,EAAE,GAAgB,EAAE,MAAa,EAAE,GAAE,uBAA4B,GAChE,MAAM,CAmBR"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { startOfDay } from "./startOfDay.js";
|
|
2
|
+
const WORDING = {
|
|
3
|
+
fr: {
|
|
4
|
+
tag: "fr-FR",
|
|
5
|
+
today: (time) => `aujourd'hui à ${time}`,
|
|
6
|
+
yesterday: (time) => `hier à ${time}`,
|
|
7
|
+
older: (day) => `le ${day}`,
|
|
8
|
+
},
|
|
9
|
+
en: {
|
|
10
|
+
tag: "en-US",
|
|
11
|
+
today: (time) => `today at ${time}`,
|
|
12
|
+
yesterday: (time) => `yesterday at ${time}`,
|
|
13
|
+
older: (day) => `on ${day}`,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
17
|
+
/**
|
|
18
|
+
* Describes a past moment the way a "last saved…" line reads best: with the
|
|
19
|
+
* time when it's today or yesterday, as a plain day otherwise. A date in the
|
|
20
|
+
* future (clock change between devices) reads as today.
|
|
21
|
+
*
|
|
22
|
+
* @param date - The moment to describe.
|
|
23
|
+
* @param options - See {@link FormatRecentDateOptions}.
|
|
24
|
+
* @returns E.g. `"aujourd'hui à 21:42"`, `"hier à 08:05"`, `"le 11 octobre 2026"`.
|
|
25
|
+
* @example
|
|
26
|
+
* formatRecentDate(lastBackupAt); // => "hier à 21:42"
|
|
27
|
+
* formatRecentDate(lastBackupAt, { locale: "en" }); // => "yesterday at 9:42 PM"
|
|
28
|
+
*/
|
|
29
|
+
export function formatRecentDate(date, { now = new Date(), locale = "fr" } = {}) {
|
|
30
|
+
const wording = WORDING[locale];
|
|
31
|
+
// Rounded: a day that has a DST change lasts 23 or 25 hours.
|
|
32
|
+
const dayDiff = Math.round((startOfDay(now).getTime() - startOfDay(date).getTime()) / DAY_MS);
|
|
33
|
+
if (dayDiff <= 1) {
|
|
34
|
+
const time = new Intl.DateTimeFormat(wording.tag, {
|
|
35
|
+
hour: "2-digit",
|
|
36
|
+
minute: "2-digit",
|
|
37
|
+
}).format(date);
|
|
38
|
+
return dayDiff === 1 ? wording.yesterday(time) : wording.today(time);
|
|
39
|
+
}
|
|
40
|
+
const day = new Intl.DateTimeFormat(wording.tag, {
|
|
41
|
+
day: "numeric",
|
|
42
|
+
month: "long",
|
|
43
|
+
year: "numeric",
|
|
44
|
+
}).format(date);
|
|
45
|
+
return wording.older(day);
|
|
46
|
+
}
|
package/dist/date/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export * from "./dateInTimeZone.js";
|
|
2
2
|
export * from "./daysUntil.js";
|
|
3
|
+
export * from "./formatRecentDate.js";
|
|
3
4
|
export * from "./formatRelativeTime.js";
|
|
4
5
|
export * from "./getPeriodStartMs.js";
|
|
5
6
|
export * from "./isSameDay.js";
|
|
7
|
+
export * from "./mondayFirstWeekday.js";
|
|
8
|
+
export * from "./parseIsoDate.js";
|
|
9
|
+
export * from "./parseSqliteDate.js";
|
|
6
10
|
export * from "./startOfDay.js";
|
|
7
11
|
export * from "./todayInTimeZone.js";
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/date/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/date/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/date/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
package/dist/date/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from "./dateInTimeZone.js";
|
|
2
2
|
export * from "./daysUntil.js";
|
|
3
|
+
export * from "./formatRecentDate.js";
|
|
3
4
|
export * from "./formatRelativeTime.js";
|
|
4
5
|
export * from "./getPeriodStartMs.js";
|
|
5
6
|
export * from "./isSameDay.js";
|
|
7
|
+
export * from "./mondayFirstWeekday.js";
|
|
8
|
+
export * from "./parseIsoDate.js";
|
|
9
|
+
export * from "./parseSqliteDate.js";
|
|
6
10
|
export * from "./startOfDay.js";
|
|
7
11
|
export * from "./todayInTimeZone.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Day of the week with Monday as the first day: `0` for Monday … `6` for
|
|
3
|
+
* Sunday (instead of JavaScript's Sunday = `0`). Handy to offset the first
|
|
4
|
+
* day of a month in a Monday-first calendar grid.
|
|
5
|
+
*
|
|
6
|
+
* @param date - A `Date`, or a `YYYY-MM-DD` calendar date read as local midnight.
|
|
7
|
+
* @returns The weekday index, Monday = `0`.
|
|
8
|
+
* @example
|
|
9
|
+
* mondayFirstWeekday("2026-10-01"); // => 3 (a Thursday)
|
|
10
|
+
*/
|
|
11
|
+
export declare function mondayFirstWeekday(date: Date | string): number;
|
|
12
|
+
//# sourceMappingURL=mondayFirstWeekday.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mondayFirstWeekday.d.ts","sourceRoot":"","sources":["../../src/date/mondayFirstWeekday.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAG9D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { parseIsoDate } from "./parseIsoDate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Day of the week with Monday as the first day: `0` for Monday … `6` for
|
|
4
|
+
* Sunday (instead of JavaScript's Sunday = `0`). Handy to offset the first
|
|
5
|
+
* day of a month in a Monday-first calendar grid.
|
|
6
|
+
*
|
|
7
|
+
* @param date - A `Date`, or a `YYYY-MM-DD` calendar date read as local midnight.
|
|
8
|
+
* @returns The weekday index, Monday = `0`.
|
|
9
|
+
* @example
|
|
10
|
+
* mondayFirstWeekday("2026-10-01"); // => 3 (a Thursday)
|
|
11
|
+
*/
|
|
12
|
+
export function mondayFirstWeekday(date) {
|
|
13
|
+
const day = (typeof date === "string" ? parseIsoDate(date) : date).getDay();
|
|
14
|
+
return (day + 6) % 7;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a `YYYY-MM-DD` calendar date as **local** midnight — unlike
|
|
3
|
+
* `new Date("2026-03-14")`, which the spec reads as UTC midnight and which
|
|
4
|
+
* therefore lands on the previous day west of Greenwich.
|
|
5
|
+
*
|
|
6
|
+
* @param iso - A calendar date, `YYYY-MM-DD`.
|
|
7
|
+
* @returns A `Date` at local midnight on that day.
|
|
8
|
+
* @example
|
|
9
|
+
* parseIsoDate("2026-03-14").getDate(); // => 14, whatever the time zone
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseIsoDate(iso: string): Date;
|
|
12
|
+
//# sourceMappingURL=parseIsoDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseIsoDate.d.ts","sourceRoot":"","sources":["../../src/date/parseIsoDate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a `YYYY-MM-DD` calendar date as **local** midnight — unlike
|
|
3
|
+
* `new Date("2026-03-14")`, which the spec reads as UTC midnight and which
|
|
4
|
+
* therefore lands on the previous day west of Greenwich.
|
|
5
|
+
*
|
|
6
|
+
* @param iso - A calendar date, `YYYY-MM-DD`.
|
|
7
|
+
* @returns A `Date` at local midnight on that day.
|
|
8
|
+
* @example
|
|
9
|
+
* parseIsoDate("2026-03-14").getDate(); // => 14, whatever the time zone
|
|
10
|
+
*/
|
|
11
|
+
export function parseIsoDate(iso) {
|
|
12
|
+
return new Date(`${iso}T00:00:00`);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a date read from SQLite. A `current_timestamp` value
|
|
3
|
+
* (`"2026-10-09 19:46:00"`, UTC without a zone marker) is read as **UTC** —
|
|
4
|
+
* `new Date()` would take it for local time and shift it by the time zone
|
|
5
|
+
* offset. Full ISO strings (with `Z` or an offset) are read as they are.
|
|
6
|
+
*
|
|
7
|
+
* @param value - A SQLite datetime or a full ISO string.
|
|
8
|
+
* @returns The corresponding `Date`.
|
|
9
|
+
* @example
|
|
10
|
+
* parseSqliteDate("2026-10-09 19:46:00").toISOString(); // => "2026-10-09T19:46:00.000Z"
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseSqliteDate(value: string): Date;
|
|
13
|
+
//# sourceMappingURL=parseSqliteDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseSqliteDate.d.ts","sourceRoot":"","sources":["../../src/date/parseSqliteDate.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAInD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// SQLite's `current_timestamp` stores UTC as "YYYY-MM-DD HH:MM:SS", with no
|
|
2
|
+
// zone marker: `new Date()` would read it as local time.
|
|
3
|
+
const SQLITE_DATETIME = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(\.\d+)?$/;
|
|
4
|
+
/**
|
|
5
|
+
* Parses a date read from SQLite. A `current_timestamp` value
|
|
6
|
+
* (`"2026-10-09 19:46:00"`, UTC without a zone marker) is read as **UTC** —
|
|
7
|
+
* `new Date()` would take it for local time and shift it by the time zone
|
|
8
|
+
* offset. Full ISO strings (with `Z` or an offset) are read as they are.
|
|
9
|
+
*
|
|
10
|
+
* @param value - A SQLite datetime or a full ISO string.
|
|
11
|
+
* @returns The corresponding `Date`.
|
|
12
|
+
* @example
|
|
13
|
+
* parseSqliteDate("2026-10-09 19:46:00").toISOString(); // => "2026-10-09T19:46:00.000Z"
|
|
14
|
+
*/
|
|
15
|
+
export function parseSqliteDate(value) {
|
|
16
|
+
return new Date(SQLITE_DATETIME.test(value) ? `${value.replace(" ", "T")}Z` : value);
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface FormatFileTimestampOptions {
|
|
2
|
+
/** Append the seconds (`HHMMSS` instead of `HHMM`). Default: `false`. */
|
|
3
|
+
seconds?: boolean;
|
|
4
|
+
/** Put between the date and the time. Default: `"-"`. */
|
|
5
|
+
separator?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Compact, file-name-safe timestamp in **local** time, `YYYYMMDD-HHMM` by
|
|
9
|
+
* default: unlike `toISOString()` (UTC, with `:` that Windows rejects), an
|
|
10
|
+
* export made at 00:30 carries the day it was made on, and names built with it
|
|
11
|
+
* sort chronologically in a file explorer.
|
|
12
|
+
*
|
|
13
|
+
* @param date - The instant to format. Default: now.
|
|
14
|
+
* @param options - `seconds`, `separator` between date and time.
|
|
15
|
+
* @returns The formatted timestamp.
|
|
16
|
+
* @example
|
|
17
|
+
* formatFileTimestamp(new Date(2026, 9, 8, 9, 2)); // => "20261008-0902"
|
|
18
|
+
* formatFileTimestamp(new Date(2026, 9, 8, 9, 2, 5), { seconds: true, separator: "" });
|
|
19
|
+
* // => "20261008090205"
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatFileTimestamp(date?: Date, { seconds, separator }?: FormatFileTimestampOptions): string;
|
|
22
|
+
//# sourceMappingURL=formatFileTimestamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatFileTimestamp.d.ts","sourceRoot":"","sources":["../../src/files/formatFileTimestamp.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,GAAE,IAAiB,EACvB,EAAE,OAAe,EAAE,SAAe,EAAE,GAAE,0BAA+B,GACpE,MAAM,CAIR"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const pad2 = (value) => String(value).padStart(2, "0");
|
|
2
|
+
/**
|
|
3
|
+
* Compact, file-name-safe timestamp in **local** time, `YYYYMMDD-HHMM` by
|
|
4
|
+
* default: unlike `toISOString()` (UTC, with `:` that Windows rejects), an
|
|
5
|
+
* export made at 00:30 carries the day it was made on, and names built with it
|
|
6
|
+
* sort chronologically in a file explorer.
|
|
7
|
+
*
|
|
8
|
+
* @param date - The instant to format. Default: now.
|
|
9
|
+
* @param options - `seconds`, `separator` between date and time.
|
|
10
|
+
* @returns The formatted timestamp.
|
|
11
|
+
* @example
|
|
12
|
+
* formatFileTimestamp(new Date(2026, 9, 8, 9, 2)); // => "20261008-0902"
|
|
13
|
+
* formatFileTimestamp(new Date(2026, 9, 8, 9, 2, 5), { seconds: true, separator: "" });
|
|
14
|
+
* // => "20261008090205"
|
|
15
|
+
*/
|
|
16
|
+
export function formatFileTimestamp(date = new Date(), { seconds = false, separator = "-" } = {}) {
|
|
17
|
+
const day = `${date.getFullYear()}${pad2(date.getMonth() + 1)}${pad2(date.getDate())}`;
|
|
18
|
+
const time = `${pad2(date.getHours())}${pad2(date.getMinutes())}${seconds ? pad2(date.getSeconds()) : ""}`;
|
|
19
|
+
return `${day}${separator}${time}`;
|
|
20
|
+
}
|
package/dist/files/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/files/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/files/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC"}
|
package/dist/files/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escapes a value for an iCalendar (RFC 5545) TEXT property — `SUMMARY`,
|
|
3
|
+
* `DESCRIPTION`, `LOCATION`…: backslashes, semicolons and commas get a
|
|
4
|
+
* backslash, line breaks become a literal `\n`.
|
|
5
|
+
*
|
|
6
|
+
* @param text - The raw text.
|
|
7
|
+
* @returns The text, safe to put after `SUMMARY:` and the like.
|
|
8
|
+
* @example
|
|
9
|
+
* escapeIcsText("Matin; puis soir, à 20h"); // => "Matin\\; puis soir\\, à 20h"
|
|
10
|
+
*/
|
|
11
|
+
export declare function escapeIcsText(text: string): string;
|
|
12
|
+
//# sourceMappingURL=escapeIcsText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escapeIcsText.d.ts","sourceRoot":"","sources":["../../src/ics/escapeIcsText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escapes a value for an iCalendar (RFC 5545) TEXT property — `SUMMARY`,
|
|
3
|
+
* `DESCRIPTION`, `LOCATION`…: backslashes, semicolons and commas get a
|
|
4
|
+
* backslash, line breaks become a literal `\n`.
|
|
5
|
+
*
|
|
6
|
+
* @param text - The raw text.
|
|
7
|
+
* @returns The text, safe to put after `SUMMARY:` and the like.
|
|
8
|
+
* @example
|
|
9
|
+
* escapeIcsText("Matin; puis soir, à 20h"); // => "Matin\\; puis soir\\, à 20h"
|
|
10
|
+
*/
|
|
11
|
+
export function escapeIcsText(text) {
|
|
12
|
+
return text
|
|
13
|
+
.replace(/\\/g, "\\\\")
|
|
14
|
+
.replace(/;/g, "\\;")
|
|
15
|
+
.replace(/,/g, "\\,")
|
|
16
|
+
.replace(/\r?\n/g, "\\n");
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Folds an iCalendar (RFC 5545) content line longer than 75 **octets**: the
|
|
3
|
+
* rest goes on continuation lines (CRLF + one space), each 75 octets at most
|
|
4
|
+
* including that space. Counts UTF-8 bytes, not characters — an accented
|
|
5
|
+
* line folded at 75 characters would overflow — and never splits a
|
|
6
|
+
* multi-byte character.
|
|
7
|
+
*
|
|
8
|
+
* @param line - One unfolded content line, without its line break.
|
|
9
|
+
* @param maxOctets - Octets per line. @defaultValue 75
|
|
10
|
+
* @returns The line, folded with `\r\n ` where needed.
|
|
11
|
+
* @example
|
|
12
|
+
* foldIcsLine(`DESCRIPTION:${"é".repeat(40)}`); // => 2 lines
|
|
13
|
+
*/
|
|
14
|
+
export declare function foldIcsLine(line: string, maxOctets?: number): string;
|
|
15
|
+
//# sourceMappingURL=foldIcsLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foldIcsLine.d.ts","sourceRoot":"","sources":["../../src/ics/foldIcsLine.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAK,GAAG,MAAM,CAgBhE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Octets taken by one code point in UTF-8. */
|
|
2
|
+
function utf8Length(codePoint) {
|
|
3
|
+
if (codePoint < 0x80)
|
|
4
|
+
return 1;
|
|
5
|
+
if (codePoint < 0x800)
|
|
6
|
+
return 2;
|
|
7
|
+
if (codePoint < 0x10000)
|
|
8
|
+
return 3;
|
|
9
|
+
return 4;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Folds an iCalendar (RFC 5545) content line longer than 75 **octets**: the
|
|
13
|
+
* rest goes on continuation lines (CRLF + one space), each 75 octets at most
|
|
14
|
+
* including that space. Counts UTF-8 bytes, not characters — an accented
|
|
15
|
+
* line folded at 75 characters would overflow — and never splits a
|
|
16
|
+
* multi-byte character.
|
|
17
|
+
*
|
|
18
|
+
* @param line - One unfolded content line, without its line break.
|
|
19
|
+
* @param maxOctets - Octets per line. @defaultValue 75
|
|
20
|
+
* @returns The line, folded with `\r\n ` where needed.
|
|
21
|
+
* @example
|
|
22
|
+
* foldIcsLine(`DESCRIPTION:${"é".repeat(40)}`); // => 2 lines
|
|
23
|
+
*/
|
|
24
|
+
export function foldIcsLine(line, maxOctets = 75) {
|
|
25
|
+
const parts = [];
|
|
26
|
+
let current = "";
|
|
27
|
+
let size = 0;
|
|
28
|
+
for (const char of line) {
|
|
29
|
+
const bytes = utf8Length(char.codePointAt(0) ?? 0);
|
|
30
|
+
if (size + bytes > maxOctets) {
|
|
31
|
+
parts.push(current);
|
|
32
|
+
current = " ";
|
|
33
|
+
size = 1;
|
|
34
|
+
}
|
|
35
|
+
current += char;
|
|
36
|
+
size += bytes;
|
|
37
|
+
}
|
|
38
|
+
parts.push(current);
|
|
39
|
+
return parts.join("\r\n");
|
|
40
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An iCalendar UTC `DATE-TIME` (`YYYYMMDDTHHMMSSZ`), as `DTSTAMP` expects.
|
|
3
|
+
*
|
|
4
|
+
* @param date - The instant. @defaultValue now
|
|
5
|
+
* @returns The instant in UTC, as `YYYYMMDDTHHMMSSZ`.
|
|
6
|
+
* @example
|
|
7
|
+
* icsTimestamp(new Date("2026-07-14T08:05:09.123Z")); // => "20260714T080509Z"
|
|
8
|
+
*/
|
|
9
|
+
export declare function icsTimestamp(date?: Date): string;
|
|
10
|
+
//# sourceMappingURL=icsTimestamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icsTimestamp.d.ts","sourceRoot":"","sources":["../../src/ics/icsTimestamp.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,IAAiB,GAAG,MAAM,CAE5D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An iCalendar UTC `DATE-TIME` (`YYYYMMDDTHHMMSSZ`), as `DTSTAMP` expects.
|
|
3
|
+
*
|
|
4
|
+
* @param date - The instant. @defaultValue now
|
|
5
|
+
* @returns The instant in UTC, as `YYYYMMDDTHHMMSSZ`.
|
|
6
|
+
* @example
|
|
7
|
+
* icsTimestamp(new Date("2026-07-14T08:05:09.123Z")); // => "20260714T080509Z"
|
|
8
|
+
*/
|
|
9
|
+
export function icsTimestamp(date = new Date()) {
|
|
10
|
+
return `${date.toISOString().replace(/[-:]/g, "").slice(0, 15)}Z`;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ics/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An iCalendar `DATE` value (`YYYYMMDD`) from a `YYYY-MM-DD` calendar date,
|
|
3
|
+
* for all-day events (`DTSTART;VALUE=DATE:…`).
|
|
4
|
+
*
|
|
5
|
+
* @param isoDate - A calendar date, `YYYY-MM-DD`.
|
|
6
|
+
* @returns The date as `YYYYMMDD`.
|
|
7
|
+
* @example
|
|
8
|
+
* toIcsDate("2026-07-14"); // => "20260714"
|
|
9
|
+
*/
|
|
10
|
+
export declare function toIcsDate(isoDate: string): string;
|
|
11
|
+
//# sourceMappingURL=toIcsDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toIcsDate.d.ts","sourceRoot":"","sources":["../../src/ics/toIcsDate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An iCalendar `DATE` value (`YYYYMMDD`) from a `YYYY-MM-DD` calendar date,
|
|
3
|
+
* for all-day events (`DTSTART;VALUE=DATE:…`).
|
|
4
|
+
*
|
|
5
|
+
* @param isoDate - A calendar date, `YYYY-MM-DD`.
|
|
6
|
+
* @returns The date as `YYYYMMDD`.
|
|
7
|
+
* @example
|
|
8
|
+
* toIcsDate("2026-07-14"); // => "20260714"
|
|
9
|
+
*/
|
|
10
|
+
export function toIcsDate(isoDate) {
|
|
11
|
+
return isoDate.replace(/-/g, "");
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An iCalendar floating local `DATE-TIME` value (`YYYYMMDDTHHMMSS`, no `Z`)
|
|
3
|
+
* from a calendar date and a wall-clock time — the calendar app shows it at
|
|
4
|
+
* that time in its own time zone.
|
|
5
|
+
*
|
|
6
|
+
* @param isoDate - A calendar date, `YYYY-MM-DD`.
|
|
7
|
+
* @param time - A time, `H:MM` or `HH:MM`.
|
|
8
|
+
* @returns The date-time as `YYYYMMDDTHHMMSS`.
|
|
9
|
+
* @example
|
|
10
|
+
* toIcsDateTime("2026-07-14", "6:30"); // => "20260714T063000"
|
|
11
|
+
*/
|
|
12
|
+
export declare function toIcsDateTime(isoDate: string, time: string): string;
|
|
13
|
+
//# sourceMappingURL=toIcsDateTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toIcsDateTime.d.ts","sourceRoot":"","sources":["../../src/ics/toIcsDateTime.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { toIcsDate } from "./toIcsDate.js";
|
|
2
|
+
/**
|
|
3
|
+
* An iCalendar floating local `DATE-TIME` value (`YYYYMMDDTHHMMSS`, no `Z`)
|
|
4
|
+
* from a calendar date and a wall-clock time — the calendar app shows it at
|
|
5
|
+
* that time in its own time zone.
|
|
6
|
+
*
|
|
7
|
+
* @param isoDate - A calendar date, `YYYY-MM-DD`.
|
|
8
|
+
* @param time - A time, `H:MM` or `HH:MM`.
|
|
9
|
+
* @returns The date-time as `YYYYMMDDTHHMMSS`.
|
|
10
|
+
* @example
|
|
11
|
+
* toIcsDateTime("2026-07-14", "6:30"); // => "20260714T063000"
|
|
12
|
+
*/
|
|
13
|
+
export function toIcsDateTime(isoDate, time) {
|
|
14
|
+
const [hours = "0", minutes = "0"] = time.split(":");
|
|
15
|
+
return `${toIcsDate(isoDate)}T${hours.padStart(2, "0")}${minutes.padStart(2, "0")}00`;
|
|
16
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from "./csv/index.js";
|
|
|
5
5
|
export * from "./date/index.js";
|
|
6
6
|
export * from "./files/index.js";
|
|
7
7
|
export * from "./function/index.js";
|
|
8
|
+
export * from "./ics/index.js";
|
|
8
9
|
export * from "./id/index.js";
|
|
9
10
|
export * from "./image/index.js";
|
|
10
11
|
export * from "./markdown/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./csv/index.js";
|
|
|
10
10
|
export * from "./date/index.js";
|
|
11
11
|
export * from "./files/index.js";
|
|
12
12
|
export * from "./function/index.js";
|
|
13
|
+
export * from "./ics/index.js";
|
|
13
14
|
export * from "./id/index.js";
|
|
14
15
|
export * from "./image/index.js";
|
|
15
16
|
export * from "./markdown/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forthtilliath/ts-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"jsdom": "^30.1.1",
|
|
28
28
|
"typescript": "^5.9.3",
|
|
29
29
|
"vitest": "^5.0.2",
|
|
30
|
-
"@forthtilliath/eslint-config": "0.
|
|
30
|
+
"@forthtilliath/eslint-config": "0.9.0",
|
|
31
31
|
"@forthtilliath/typescript-config": "0.1.1"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|