@worknice/utils 0.0.5 → 0.0.6-rc.1
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/package.json +14 -14
- package/dist/errors/RequestError.d.ts +0 -8
- package/dist/errors/RequestError.js +0 -19
- package/dist/errors/RequestError.js.map +0 -1
- package/dist/index.d.ts +0 -20
- package/dist/index.js +0 -41
- package/dist/index.js.map +0 -1
- package/dist/temporal/MAX_INSTANT.d.ts +0 -5
- package/dist/temporal/MAX_INSTANT.js +0 -7
- package/dist/temporal/MAX_INSTANT.js.map +0 -1
- package/dist/temporal/MAX_PLAIN_DATE.d.ts +0 -5
- package/dist/temporal/MAX_PLAIN_DATE.js +0 -7
- package/dist/temporal/MAX_PLAIN_DATE.js.map +0 -1
- package/dist/temporal/MIN_INSTANT.d.ts +0 -5
- package/dist/temporal/MIN_INSTANT.js +0 -7
- package/dist/temporal/MIN_INSTANT.js.map +0 -1
- package/dist/temporal/MIN_PLAIN_DATE.d.ts +0 -5
- package/dist/temporal/MIN_PLAIN_DATE.js +0 -7
- package/dist/temporal/MIN_PLAIN_DATE.js.map +0 -1
- package/dist/temporal/compareInstants.d.ts +0 -11
- package/dist/temporal/compareInstants.js +0 -15
- package/dist/temporal/compareInstants.js.map +0 -1
- package/dist/temporal/comparePlainDates.d.ts +0 -11
- package/dist/temporal/comparePlainDates.js +0 -15
- package/dist/temporal/comparePlainDates.js.map +0 -1
- package/dist/temporal/convertPlainDateToInstant.d.ts +0 -5
- package/dist/temporal/convertPlainDateToInstant.js +0 -6
- package/dist/temporal/convertPlainDateToInstant.js.map +0 -1
- package/dist/temporal/envCheck.d.ts +0 -3
- package/dist/temporal/envCheck.js +0 -10
- package/dist/temporal/envCheck.js.map +0 -1
- package/dist/temporal/isInstantAfter.d.ts +0 -7
- package/dist/temporal/isInstantAfter.js +0 -8
- package/dist/temporal/isInstantAfter.js.map +0 -1
- package/dist/temporal/isInstantBefore.d.ts +0 -7
- package/dist/temporal/isInstantBefore.js +0 -8
- package/dist/temporal/isInstantBefore.js.map +0 -1
- package/dist/temporal/isPlainDateAfter.d.ts +0 -7
- package/dist/temporal/isPlainDateAfter.js +0 -8
- package/dist/temporal/isPlainDateAfter.js.map +0 -1
- package/dist/temporal/isPlainDateBefore.d.ts +0 -7
- package/dist/temporal/isPlainDateBefore.js +0 -8
- package/dist/temporal/isPlainDateBefore.js.map +0 -1
- package/dist/temporal/isSamePlainDate.d.ts +0 -9
- package/dist/temporal/isSamePlainDate.js +0 -9
- package/dist/temporal/isSamePlainDate.js.map +0 -1
- package/dist/temporal/isValidInstant.d.ts +0 -5
- package/dist/temporal/isValidInstant.js +0 -14
- package/dist/temporal/isValidInstant.js.map +0 -1
- package/dist/temporal/isValidPlainDate.d.ts +0 -5
- package/dist/temporal/isValidPlainDate.js +0 -14
- package/dist/temporal/isValidPlainDate.js.map +0 -1
- package/dist/temporal/isValidPlainDateTime.d.ts +0 -5
- package/dist/temporal/isValidPlainDateTime.js +0 -14
- package/dist/temporal/isValidPlainDateTime.js.map +0 -1
- package/dist/temporal/latestInstant.d.ts +0 -9
- package/dist/temporal/latestInstant.js +0 -8
- package/dist/temporal/latestInstant.js.map +0 -1
- package/dist/temporal/parseInstant.d.ts +0 -5
- package/dist/temporal/parseInstant.js +0 -14
- package/dist/temporal/parseInstant.js.map +0 -1
- package/dist/temporal/parsePlainDate.d.ts +0 -5
- package/dist/temporal/parsePlainDate.js +0 -14
- package/dist/temporal/parsePlainDate.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worknice/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "rm -rf ./dist && tsup",
|
|
8
|
+
"dev": "rm -rf ./dist && tsup --watch",
|
|
9
|
+
"dev:test": "vitest",
|
|
10
|
+
"test": "if [[ -z $TURBO_HASH ]]; then echo 'Use `pnpm turbo test` to run tests.\n' && exit 1; else exit 0; fi",
|
|
11
|
+
"test:unit": "vitest run",
|
|
12
|
+
"test:lint": "eslint src --color",
|
|
13
|
+
"test:prettier": "prettier -c '**/*.{js,ts,tsx,css}'",
|
|
14
|
+
"test:types": "tsc --noEmit --pretty"
|
|
15
|
+
},
|
|
6
16
|
"type": "module",
|
|
7
17
|
"main": "./dist/index.js",
|
|
8
18
|
"module": "./dist/index.js",
|
|
@@ -28,23 +38,13 @@
|
|
|
28
38
|
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
29
39
|
"@typescript-eslint/parser": "^8.7.0",
|
|
30
40
|
"eslint": "^8.57.1",
|
|
41
|
+
"semantic-release": "^24.2.2",
|
|
31
42
|
"temporal-polyfill": "^0.2.5",
|
|
32
43
|
"tsup": "^8.2.4",
|
|
33
44
|
"typescript": "~5.5.0",
|
|
34
|
-
"vitest": "^2.1.
|
|
45
|
+
"vitest": "^2.1.9"
|
|
35
46
|
},
|
|
36
47
|
"peerDependencies": {
|
|
37
48
|
"temporal-polyfill": "^0.2.1"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "rm -rf ./dist && tsup",
|
|
41
|
-
"dev": "rm -rf ./dist && tsup --watch",
|
|
42
|
-
"dev:test": "vitest",
|
|
43
|
-
"release": "pnpm build && pnpm dlx @jsdevtools/version-bump-prompt --commit \"chore(utils): release v%s\" --tag \"utils-v%s\" && pnpm publish --access public",
|
|
44
|
-
"test": "if [[ -z $TURBO_HASH ]]; then echo 'Use `pnpm turbo test` to run tests.\n' && exit 1; else exit 0; fi",
|
|
45
|
-
"test:unit": "vitest run",
|
|
46
|
-
"test:lint": "eslint src --color",
|
|
47
|
-
"test:prettier": "prettier -c '**/*.{js,ts,tsx,css}'",
|
|
48
|
-
"test:types": "tsc --noEmit --pretty"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare class RequestError extends Error {
|
|
2
|
-
method: string;
|
|
3
|
-
response: Response;
|
|
4
|
-
responseBody?: string | undefined;
|
|
5
|
-
constructor(method: string, response: Response, responseBody?: string | undefined, options?: ErrorOptions);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export { RequestError as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
class RequestError extends Error {
|
|
2
|
-
constructor(method, response, responseBody, options) {
|
|
3
|
-
super(
|
|
4
|
-
`${method} ${response.url} ${response.status} ${response.statusText}` + (responseBody ? `
|
|
5
|
-
|
|
6
|
-
${responseBody}` : ""),
|
|
7
|
-
options
|
|
8
|
-
);
|
|
9
|
-
this.method = method;
|
|
10
|
-
this.response = response;
|
|
11
|
-
this.responseBody = responseBody;
|
|
12
|
-
this.name = "RequestError";
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
var RequestError_default = RequestError;
|
|
16
|
-
export {
|
|
17
|
-
RequestError_default as default
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=RequestError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/RequestError.ts"],"sourcesContent":["class RequestError extends Error {\n constructor(\n public method: string,\n public response: Response,\n public responseBody?: string,\n options?: ErrorOptions,\n ) {\n super(\n `${method} ${response.url} ${response.status} ${response.statusText}` +\n (responseBody ? `\\n\\n${responseBody}` : \"\"),\n options,\n );\n this.name = \"RequestError\";\n }\n}\n\nexport default RequestError;\n"],"mappings":"AAAA,MAAM,qBAAqB,MAAM;AAAA,EAC/B,YACS,QACA,UACA,cACP,SACA;AACA;AAAA,MACE,GAAG,MAAM,IAAI,SAAS,GAAG,IAAI,SAAS,MAAM,IAAI,SAAS,UAAU,MAChE,eAAe;AAAA;AAAA,EAAO,YAAY,KAAK;AAAA,MAC1C;AAAA,IACF;AATO;AACA;AACA;AAQP,SAAK,OAAO;AAAA,EACd;AACF;AAEA,IAAO,uBAAQ;","names":[]}
|
package/dist/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { default as compareInstants } from './temporal/compareInstants.js';
|
|
2
|
-
export { default as comparePlainDates } from './temporal/comparePlainDates.js';
|
|
3
|
-
export { default as convertPlainDateToInstant } from './temporal/convertPlainDateToInstant.js';
|
|
4
|
-
export { default as envCheck } from './temporal/envCheck.js';
|
|
5
|
-
export { default as isInstantAfter } from './temporal/isInstantAfter.js';
|
|
6
|
-
export { default as isInstantBefore } from './temporal/isInstantBefore.js';
|
|
7
|
-
export { default as isPlainDateAfter } from './temporal/isPlainDateAfter.js';
|
|
8
|
-
export { default as isPlainDateBefore } from './temporal/isPlainDateBefore.js';
|
|
9
|
-
export { default as isSamePlainDate } from './temporal/isSamePlainDate.js';
|
|
10
|
-
export { default as isValidInstant } from './temporal/isValidInstant.js';
|
|
11
|
-
export { default as isValidPlainDate } from './temporal/isValidPlainDate.js';
|
|
12
|
-
export { default as isValidPlainDateTime } from './temporal/isValidPlainDateTime.js';
|
|
13
|
-
export { default as latestInstant } from './temporal/latestInstant.js';
|
|
14
|
-
export { default as MAX_INSTANT } from './temporal/MAX_INSTANT.js';
|
|
15
|
-
export { default as MAX_PLAIN_DATE } from './temporal/MAX_PLAIN_DATE.js';
|
|
16
|
-
export { default as MIN_INSTANT } from './temporal/MIN_INSTANT.js';
|
|
17
|
-
export { default as MIN_PLAIN_DATE } from './temporal/MIN_PLAIN_DATE.js';
|
|
18
|
-
export { default as parseInstant } from './temporal/parseInstant.js';
|
|
19
|
-
export { default as parsePlainDate } from './temporal/parsePlainDate.js';
|
|
20
|
-
import 'temporal-polyfill';
|
package/dist/index.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { default as default2 } from "./temporal/compareInstants.js";
|
|
2
|
-
import { default as default3 } from "./temporal/comparePlainDates.js";
|
|
3
|
-
import { default as default4 } from "./temporal/convertPlainDateToInstant.js";
|
|
4
|
-
import { default as default5 } from "./temporal/envCheck.js";
|
|
5
|
-
import { default as default6 } from "./temporal/isInstantAfter.js";
|
|
6
|
-
import { default as default7 } from "./temporal/isInstantBefore.js";
|
|
7
|
-
import { default as default8 } from "./temporal/isPlainDateAfter.js";
|
|
8
|
-
import { default as default9 } from "./temporal/isPlainDateBefore.js";
|
|
9
|
-
import { default as default10 } from "./temporal/isSamePlainDate.js";
|
|
10
|
-
import { default as default11 } from "./temporal/isValidInstant.js";
|
|
11
|
-
import { default as default12 } from "./temporal/isValidPlainDate.js";
|
|
12
|
-
import { default as default13 } from "./temporal/isValidPlainDateTime.js";
|
|
13
|
-
import { default as default14 } from "./temporal/latestInstant.js";
|
|
14
|
-
import { default as default15 } from "./temporal/MAX_INSTANT.js";
|
|
15
|
-
import { default as default16 } from "./temporal/MAX_PLAIN_DATE.js";
|
|
16
|
-
import { default as default17 } from "./temporal/MIN_INSTANT.js";
|
|
17
|
-
import { default as default18 } from "./temporal/MIN_PLAIN_DATE.js";
|
|
18
|
-
import { default as default19 } from "./temporal/parseInstant.js";
|
|
19
|
-
import { default as default20 } from "./temporal/parsePlainDate.js";
|
|
20
|
-
export {
|
|
21
|
-
default15 as MAX_INSTANT,
|
|
22
|
-
default16 as MAX_PLAIN_DATE,
|
|
23
|
-
default17 as MIN_INSTANT,
|
|
24
|
-
default18 as MIN_PLAIN_DATE,
|
|
25
|
-
default2 as compareInstants,
|
|
26
|
-
default3 as comparePlainDates,
|
|
27
|
-
default4 as convertPlainDateToInstant,
|
|
28
|
-
default5 as envCheck,
|
|
29
|
-
default6 as isInstantAfter,
|
|
30
|
-
default7 as isInstantBefore,
|
|
31
|
-
default8 as isPlainDateAfter,
|
|
32
|
-
default9 as isPlainDateBefore,
|
|
33
|
-
default10 as isSamePlainDate,
|
|
34
|
-
default11 as isValidInstant,
|
|
35
|
-
default12 as isValidPlainDate,
|
|
36
|
-
default13 as isValidPlainDateTime,
|
|
37
|
-
default14 as latestInstant,
|
|
38
|
-
default19 as parseInstant,
|
|
39
|
-
default20 as parsePlainDate
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { default as compareInstants } from \"./temporal/compareInstants.js\";\nexport { default as comparePlainDates } from \"./temporal/comparePlainDates.js\";\nexport { default as convertPlainDateToInstant } from \"./temporal/convertPlainDateToInstant.js\";\nexport { default as envCheck } from \"./temporal/envCheck.js\";\nexport { default as isInstantAfter } from \"./temporal/isInstantAfter.js\";\nexport { default as isInstantBefore } from \"./temporal/isInstantBefore.js\";\nexport { default as isPlainDateAfter } from \"./temporal/isPlainDateAfter.js\";\nexport { default as isPlainDateBefore } from \"./temporal/isPlainDateBefore.js\";\nexport { default as isSamePlainDate } from \"./temporal/isSamePlainDate.js\";\nexport { default as isValidInstant } from \"./temporal/isValidInstant.js\";\nexport { default as isValidPlainDate } from \"./temporal/isValidPlainDate.js\";\nexport { default as isValidPlainDateTime } from \"./temporal/isValidPlainDateTime.js\";\nexport { default as latestInstant } from \"./temporal/latestInstant.js\";\nexport { default as MAX_INSTANT } from \"./temporal/MAX_INSTANT.js\";\nexport { default as MAX_PLAIN_DATE } from \"./temporal/MAX_PLAIN_DATE.js\";\nexport { default as MIN_INSTANT } from \"./temporal/MIN_INSTANT.js\";\nexport { default as MIN_PLAIN_DATE } from \"./temporal/MIN_PLAIN_DATE.js\";\nexport { default as parseInstant } from \"./temporal/parseInstant.js\";\nexport { default as parsePlainDate } from \"./temporal/parsePlainDate.js\";\n"],"mappings":"AAAA,SAAoB,WAAXA,gBAAkC;AAC3C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,gBAA4C;AACrD,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAkC;AAC3C,SAAoB,WAAXA,gBAAmC;AAC5C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,iBAAkC;AAC3C,SAAoB,WAAXA,iBAAiC;AAC1C,SAAoB,WAAXA,iBAAmC;AAC5C,SAAoB,WAAXA,iBAAuC;AAChD,SAAoB,WAAXA,iBAAgC;AACzC,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAAiC;AAC1C,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAAiC;AAC1C,SAAoB,WAAXA,iBAA+B;AACxC,SAAoB,WAAXA,iBAAiC;","names":["default"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
const MAX_INSTANT = Temporal.Instant.fromEpochMilliseconds(Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
|
|
3
|
-
var MAX_INSTANT_default = MAX_INSTANT;
|
|
4
|
-
export {
|
|
5
|
-
MAX_INSTANT_default as default
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=MAX_INSTANT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/MAX_INSTANT.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\nconst MAX_INSTANT = Temporal.Instant.fromEpochMilliseconds(Math.pow(10, 8) * 24 * 60 * 60 * 1000);\n\nexport default MAX_INSTANT;\n"],"mappings":"AAAA,SAAS,gBAAgB;AAEzB,MAAM,cAAc,SAAS,QAAQ,sBAAsB,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,KAAK,GAAI;AAEhG,IAAO,sBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/MAX_PLAIN_DATE.ts"],"sourcesContent":["import MAX_INSTANT from \"./MAX_INSTANT.js\";\n\nconst MAX_PLAIN_DATE = MAX_INSTANT.toZonedDateTimeISO(\"UTC\").toPlainDate();\n\nexport default MAX_PLAIN_DATE;\n"],"mappings":"AAAA,OAAO,iBAAiB;AAExB,MAAM,iBAAiB,YAAY,mBAAmB,KAAK,EAAE,YAAY;AAEzE,IAAO,yBAAQ;","names":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
const MIN_INSTANT = Temporal.Instant.fromEpochMilliseconds(-Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
|
|
3
|
-
var MIN_INSTANT_default = MIN_INSTANT;
|
|
4
|
-
export {
|
|
5
|
-
MIN_INSTANT_default as default
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=MIN_INSTANT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/MIN_INSTANT.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\nconst MIN_INSTANT = Temporal.Instant.fromEpochMilliseconds(-Math.pow(10, 8) * 24 * 60 * 60 * 1000);\n\nexport default MIN_INSTANT;\n"],"mappings":"AAAA,SAAS,gBAAgB;AAEzB,MAAM,cAAc,SAAS,QAAQ,sBAAsB,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,KAAK,GAAI;AAEjG,IAAO,sBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/MIN_PLAIN_DATE.ts"],"sourcesContent":["import MIN_INSTANT from \"./MIN_INSTANT.js\";\n\nconst MIN_PLAIN_DATE = MIN_INSTANT.toZonedDateTimeISO(\"UTC\").toPlainDate();\n\nexport default MIN_PLAIN_DATE;\n"],"mappings":"AAAA,OAAO,iBAAiB;AAExB,MAAM,iBAAiB,YAAY,mBAAmB,KAAK,EAAE,YAAY;AAEzE,IAAO,yBAAQ;","names":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Default direction is ascending with nulls first.
|
|
5
|
-
*/
|
|
6
|
-
declare const compareInstants: (a: Temporal.Instant | null, b: Temporal.Instant | null, options?: {
|
|
7
|
-
direction?: "asc" | "desc";
|
|
8
|
-
nullsFirst?: boolean;
|
|
9
|
-
}) => number;
|
|
10
|
-
|
|
11
|
-
export { compareInstants as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import MAX_INSTANT from "./MAX_INSTANT.js";
|
|
3
|
-
import MIN_INSTANT from "./MIN_INSTANT.js";
|
|
4
|
-
const compareInstants = (a, b, options) => {
|
|
5
|
-
const nullsFirst = options?.nullsFirst ?? true;
|
|
6
|
-
const direction = options?.direction ?? "asc";
|
|
7
|
-
const instantA = a ?? (nullsFirst ? MAX_INSTANT : MIN_INSTANT);
|
|
8
|
-
const instantB = b ?? (nullsFirst ? MAX_INSTANT : MIN_INSTANT);
|
|
9
|
-
return Temporal.Instant.compare(instantA, instantB) * (direction === "asc" ? 1 : -1);
|
|
10
|
-
};
|
|
11
|
-
var compareInstants_default = compareInstants;
|
|
12
|
-
export {
|
|
13
|
-
compareInstants_default as default
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=compareInstants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/compareInstants.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport MAX_INSTANT from \"./MAX_INSTANT.js\";\nimport MIN_INSTANT from \"./MIN_INSTANT.js\";\n\n/**\n * Default direction is ascending with nulls first.\n */\nconst compareInstants = (\n a: Temporal.Instant | null,\n b: Temporal.Instant | null,\n options?: {\n direction?: \"asc\" | \"desc\";\n nullsFirst?: boolean;\n },\n) => {\n const nullsFirst = options?.nullsFirst ?? true;\n const direction = options?.direction ?? \"asc\";\n const instantA = a ?? (nullsFirst ? MAX_INSTANT : MIN_INSTANT);\n const instantB = b ?? (nullsFirst ? MAX_INSTANT : MIN_INSTANT);\n return Temporal.Instant.compare(instantA, instantB) * (direction === \"asc\" ? 1 : -1);\n};\n\nexport default compareInstants;\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AAKxB,MAAM,kBAAkB,CACtB,GACA,GACA,YAIG;AACH,QAAM,aAAa,SAAS,cAAc;AAC1C,QAAM,YAAY,SAAS,aAAa;AACxC,QAAM,WAAW,MAAM,aAAa,cAAc;AAClD,QAAM,WAAW,MAAM,aAAa,cAAc;AAClD,SAAO,SAAS,QAAQ,QAAQ,UAAU,QAAQ,KAAK,cAAc,QAAQ,IAAI;AACnF;AAEA,IAAO,0BAAQ;","names":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Default direction is ascending with nulls first.
|
|
5
|
-
*/
|
|
6
|
-
declare const comparePlainDates: (a: Temporal.PlainDate | null, b: Temporal.PlainDate | null, options?: {
|
|
7
|
-
direction?: "asc" | "desc";
|
|
8
|
-
nullsFirst?: boolean;
|
|
9
|
-
}) => number;
|
|
10
|
-
|
|
11
|
-
export { comparePlainDates as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import MAX_PLAIN_DATE from "./MAX_PLAIN_DATE.js";
|
|
3
|
-
import MIN_PLAIN_DATE from "./MIN_PLAIN_DATE.js";
|
|
4
|
-
const comparePlainDates = (a, b, options) => {
|
|
5
|
-
const nullsFirst = options?.nullsFirst ?? true;
|
|
6
|
-
const direction = options?.direction ?? "asc";
|
|
7
|
-
const dateA = a ?? (nullsFirst ? MAX_PLAIN_DATE : MIN_PLAIN_DATE);
|
|
8
|
-
const dateB = b ?? (nullsFirst ? MAX_PLAIN_DATE : MIN_PLAIN_DATE);
|
|
9
|
-
return Temporal.PlainDate.compare(dateA, dateB) * (direction === "asc" ? 1 : -1);
|
|
10
|
-
};
|
|
11
|
-
var comparePlainDates_default = comparePlainDates;
|
|
12
|
-
export {
|
|
13
|
-
comparePlainDates_default as default
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=comparePlainDates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/comparePlainDates.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport MAX_PLAIN_DATE from \"./MAX_PLAIN_DATE.js\";\nimport MIN_PLAIN_DATE from \"./MIN_PLAIN_DATE.js\";\n\n/**\n * Default direction is ascending with nulls first.\n */\nconst comparePlainDates = (\n a: Temporal.PlainDate | null,\n b: Temporal.PlainDate | null,\n options?: {\n direction?: \"asc\" | \"desc\";\n nullsFirst?: boolean;\n },\n) => {\n const nullsFirst = options?.nullsFirst ?? true;\n const direction = options?.direction ?? \"asc\";\n const dateA = a ?? (nullsFirst ? MAX_PLAIN_DATE : MIN_PLAIN_DATE);\n const dateB = b ?? (nullsFirst ? MAX_PLAIN_DATE : MIN_PLAIN_DATE);\n return Temporal.PlainDate.compare(dateA, dateB) * (direction === \"asc\" ? 1 : -1);\n};\n\nexport default comparePlainDates;\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB,OAAO,oBAAoB;AAC3B,OAAO,oBAAoB;AAK3B,MAAM,oBAAoB,CACxB,GACA,GACA,YAIG;AACH,QAAM,aAAa,SAAS,cAAc;AAC1C,QAAM,YAAY,SAAS,aAAa;AACxC,QAAM,QAAQ,MAAM,aAAa,iBAAiB;AAClD,QAAM,QAAQ,MAAM,aAAa,iBAAiB;AAClD,SAAO,SAAS,UAAU,QAAQ,OAAO,KAAK,KAAK,cAAc,QAAQ,IAAI;AAC/E;AAEA,IAAO,4BAAQ;","names":[]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const convertPlainDateToInstant = (plainDate, timeZone) => plainDate ? plainDate.toZonedDateTime({ timeZone }).toInstant() : null;
|
|
2
|
-
var convertPlainDateToInstant_default = convertPlainDateToInstant;
|
|
3
|
-
export {
|
|
4
|
-
convertPlainDateToInstant_default as default
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=convertPlainDateToInstant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/convertPlainDateToInstant.ts"],"sourcesContent":["import type { Temporal } from \"temporal-polyfill\";\n\nconst convertPlainDateToInstant = (\n plainDate: Temporal.PlainDate | null,\n timeZone: string,\n): Temporal.Instant | null =>\n plainDate ? plainDate.toZonedDateTime({ timeZone }).toInstant() : null;\n\nexport default convertPlainDateToInstant;\n"],"mappings":"AAEA,MAAM,4BAA4B,CAChC,WACA,aAEA,YAAY,UAAU,gBAAgB,EAAE,SAAS,CAAC,EAAE,UAAU,IAAI;AAEpE,IAAO,oCAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/envCheck.ts"],"sourcesContent":["function envCheck(value: string | undefined, name: string): asserts value is string {\n if (value === undefined) {\n throw Error(`Missing \\`${name}\\` environment variable.`);\n }\n}\n\nexport default envCheck;\n"],"mappings":"AAAA,SAAS,SAAS,OAA2B,MAAuC;AAClF,MAAI,UAAU,QAAW;AACvB,UAAM,MAAM,aAAa,IAAI,0BAA0B;AAAA,EACzD;AACF;AAEA,IAAO,mBAAQ;","names":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import compareInstants from "./compareInstants.js";
|
|
3
|
-
const isInstantAfter = (a, b, options) => compareInstants(a, b, { direction: "asc", nullsFirst: options?.nullsFirst }) === 1;
|
|
4
|
-
var isInstantAfter_default = isInstantAfter;
|
|
5
|
-
export {
|
|
6
|
-
isInstantAfter_default as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=isInstantAfter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isInstantAfter.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport compareInstants from \"./compareInstants.js\";\n\nconst isInstantAfter = (\n a: Temporal.Instant | null,\n b: Temporal.Instant | null,\n options?: {\n nullsFirst?: boolean;\n },\n) => compareInstants(a, b, { direction: \"asc\", nullsFirst: options?.nullsFirst }) === 1;\n\nexport default isInstantAfter;\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB,OAAO,qBAAqB;AAE5B,MAAM,iBAAiB,CACrB,GACA,GACA,YAGG,gBAAgB,GAAG,GAAG,EAAE,WAAW,OAAO,YAAY,SAAS,WAAW,CAAC,MAAM;AAEtF,IAAO,yBAAQ;","names":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import compareInstants from "./compareInstants.js";
|
|
3
|
-
const isInstantBefore = (a, b, options) => compareInstants(a, b, { direction: "desc", nullsFirst: options?.nullsFirst }) === 1;
|
|
4
|
-
var isInstantBefore_default = isInstantBefore;
|
|
5
|
-
export {
|
|
6
|
-
isInstantBefore_default as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=isInstantBefore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isInstantBefore.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport compareInstants from \"./compareInstants.js\";\n\nconst isInstantBefore = (\n a: Temporal.Instant | null,\n b: Temporal.Instant | null,\n options?: {\n nullsFirst?: boolean;\n },\n) => compareInstants(a, b, { direction: \"desc\", nullsFirst: options?.nullsFirst }) === 1;\n\nexport default isInstantBefore;\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB,OAAO,qBAAqB;AAE5B,MAAM,kBAAkB,CACtB,GACA,GACA,YAGG,gBAAgB,GAAG,GAAG,EAAE,WAAW,QAAQ,YAAY,SAAS,WAAW,CAAC,MAAM;AAEvF,IAAO,0BAAQ;","names":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import comparePlainDates from "./comparePlainDates.js";
|
|
3
|
-
const isPlainDateAfter = (a, b, options) => comparePlainDates(a, b, { direction: "asc", nullsFirst: options?.nullsFirst }) === 1;
|
|
4
|
-
var isPlainDateAfter_default = isPlainDateAfter;
|
|
5
|
-
export {
|
|
6
|
-
isPlainDateAfter_default as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=isPlainDateAfter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isPlainDateAfter.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport comparePlainDates from \"./comparePlainDates.js\";\n\nconst isPlainDateAfter = (\n a: Temporal.PlainDate | null,\n b: Temporal.PlainDate | null,\n options?: {\n nullsFirst?: boolean;\n },\n) => comparePlainDates(a, b, { direction: \"asc\", nullsFirst: options?.nullsFirst }) === 1;\n\nexport default isPlainDateAfter;\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB,OAAO,uBAAuB;AAE9B,MAAM,mBAAmB,CACvB,GACA,GACA,YAGG,kBAAkB,GAAG,GAAG,EAAE,WAAW,OAAO,YAAY,SAAS,WAAW,CAAC,MAAM;AAExF,IAAO,2BAAQ;","names":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import comparePlainDates from "./comparePlainDates.js";
|
|
3
|
-
const isPlainDateBefore = (a, b, options) => comparePlainDates(a, b, { direction: "desc", nullsFirst: options?.nullsFirst }) === 1;
|
|
4
|
-
var isPlainDateBefore_default = isPlainDateBefore;
|
|
5
|
-
export {
|
|
6
|
-
isPlainDateBefore_default as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=isPlainDateBefore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isPlainDateBefore.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport comparePlainDates from \"./comparePlainDates.js\";\n\nconst isPlainDateBefore = (\n a: Temporal.PlainDate | null,\n b: Temporal.PlainDate | null,\n options?: {\n nullsFirst?: boolean;\n },\n) => comparePlainDates(a, b, { direction: \"desc\", nullsFirst: options?.nullsFirst }) === 1;\n\nexport default isPlainDateBefore;\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB,OAAO,uBAAuB;AAE9B,MAAM,oBAAoB,CACxB,GACA,GACA,YAGG,kBAAkB,GAAG,GAAG,EAAE,WAAW,QAAQ,YAAY,SAAS,WAAW,CAAC,MAAM;AAEzF,IAAO,4BAAQ;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Returns true if a and b are both valid plain dates and represent the same
|
|
5
|
-
* date. Returns false if either date is null.
|
|
6
|
-
*/
|
|
7
|
-
declare const isSamePlainDate: (a: Temporal.PlainDate | null, b: Temporal.PlainDate | null) => boolean;
|
|
8
|
-
|
|
9
|
-
export { isSamePlainDate as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isSamePlainDate.ts"],"sourcesContent":["import type { Temporal } from \"temporal-polyfill\";\n\n/**\n * Returns true if a and b are both valid plain dates and represent the same\n * date. Returns false if either date is null.\n */\nconst isSamePlainDate = (a: Temporal.PlainDate | null, b: Temporal.PlainDate | null): boolean => {\n if (a === null || b === null) return false;\n return a.equals(b);\n};\n\nexport default isSamePlainDate;\n"],"mappings":"AAMA,MAAM,kBAAkB,CAAC,GAA8B,MAA0C;AAC/F,MAAI,MAAM,QAAQ,MAAM,KAAM,QAAO;AACrC,SAAO,EAAE,OAAO,CAAC;AACnB;AAEA,IAAO,0BAAQ;","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
const isValidInstant = (instant) => {
|
|
3
|
-
if (instant === null || instant === void 0) return false;
|
|
4
|
-
try {
|
|
5
|
-
return Boolean(Temporal.Instant.from(instant));
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var isValidInstant_default = isValidInstant;
|
|
11
|
-
export {
|
|
12
|
-
isValidInstant_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=isValidInstant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isValidInstant.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\nconst isValidInstant = (\n instant: Temporal.Instant | string | null | undefined,\n): instant is string => {\n if (instant === null || instant === undefined) return false;\n try {\n return Boolean(Temporal.Instant.from(instant));\n } catch {\n return false;\n }\n};\n\nexport default isValidInstant;\n"],"mappings":"AAAA,SAAS,gBAAgB;AAEzB,MAAM,iBAAiB,CACrB,YACsB;AACtB,MAAI,YAAY,QAAQ,YAAY,OAAW,QAAO;AACtD,MAAI;AACF,WAAO,QAAQ,SAAS,QAAQ,KAAK,OAAO,CAAC;AAAA,EAC/C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAO,yBAAQ;","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
const isValidPlainDate = (date, options) => {
|
|
3
|
-
if (date === null || date === void 0) return false;
|
|
4
|
-
try {
|
|
5
|
-
return Boolean(Temporal.PlainDate.from(date, options));
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var isValidPlainDate_default = isValidPlainDate;
|
|
11
|
-
export {
|
|
12
|
-
isValidPlainDate_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=isValidPlainDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isValidPlainDate.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\nconst isValidPlainDate = (\n date: Temporal.PlainDate | string | null | undefined,\n options?: Temporal.AssignmentOptions,\n): date is string => {\n if (date === null || date === undefined) return false;\n try {\n return Boolean(Temporal.PlainDate.from(date, options));\n } catch {\n return false;\n }\n};\n\nexport default isValidPlainDate;\n"],"mappings":"AAAA,SAAS,gBAAgB;AAEzB,MAAM,mBAAmB,CACvB,MACA,YACmB;AACnB,MAAI,SAAS,QAAQ,SAAS,OAAW,QAAO;AAChD,MAAI;AACF,WAAO,QAAQ,SAAS,UAAU,KAAK,MAAM,OAAO,CAAC;AAAA,EACvD,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAO,2BAAQ;","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
const isValidPlainDateTime = (dateTime) => {
|
|
3
|
-
if (dateTime === null || dateTime === void 0) return false;
|
|
4
|
-
try {
|
|
5
|
-
return Boolean(Temporal.PlainDateTime.from(dateTime));
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var isValidPlainDateTime_default = isValidPlainDateTime;
|
|
11
|
-
export {
|
|
12
|
-
isValidPlainDateTime_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=isValidPlainDateTime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/isValidPlainDateTime.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\nconst isValidPlainDateTime = (\n dateTime: Temporal.PlainDateTime | string | null | undefined,\n): dateTime is string => {\n if (dateTime === null || dateTime === undefined) return false;\n try {\n return Boolean(Temporal.PlainDateTime.from(dateTime));\n } catch {\n return false;\n }\n};\n\nexport default isValidPlainDateTime;\n"],"mappings":"AAAA,SAAS,gBAAgB;AAEzB,MAAM,uBAAuB,CAC3B,aACuB;AACvB,MAAI,aAAa,QAAQ,aAAa,OAAW,QAAO;AACxD,MAAI;AACF,WAAO,QAAQ,SAAS,cAAc,KAAK,QAAQ,CAAC;AAAA,EACtD,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAO,+BAAQ;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Returns the latest instant from an array of instants (ignoring nulls). if the
|
|
5
|
-
* array is empty or contains only nulls, returns null.
|
|
6
|
-
*/
|
|
7
|
-
declare const latestInstant: (instants: Array<Temporal.Instant | null>) => Temporal.Instant | null;
|
|
8
|
-
|
|
9
|
-
export { latestInstant as default };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import compareInstants from "./compareInstants.js";
|
|
3
|
-
const latestInstant = (instants) => [...instants].sort((a, b) => compareInstants(a, b, { direction: "desc", nullsFirst: false })).at(0) ?? null;
|
|
4
|
-
var latestInstant_default = latestInstant;
|
|
5
|
-
export {
|
|
6
|
-
latestInstant_default as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=latestInstant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/latestInstant.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport compareInstants from \"./compareInstants.js\";\n\n/**\n * Returns the latest instant from an array of instants (ignoring nulls). if the\n * array is empty or contains only nulls, returns null.\n */\nconst latestInstant = (instants: Array<Temporal.Instant | null>) =>\n [...instants]\n .sort((a, b) => compareInstants(a, b, { direction: \"desc\", nullsFirst: false }))\n .at(0) ?? null;\n\nexport default latestInstant;\n"],"mappings":"AAAA,SAAS,gBAAgB;AACzB,OAAO,qBAAqB;AAM5B,MAAM,gBAAgB,CAAC,aACrB,CAAC,GAAG,QAAQ,EACT,KAAK,CAAC,GAAG,MAAM,gBAAgB,GAAG,GAAG,EAAE,WAAW,QAAQ,YAAY,MAAM,CAAC,CAAC,EAC9E,GAAG,CAAC,KAAK;AAEd,IAAO,wBAAQ;","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
const parseInstant = (date) => {
|
|
3
|
-
if (date === null || date === void 0) return null;
|
|
4
|
-
try {
|
|
5
|
-
return Temporal.Instant.from(date);
|
|
6
|
-
} catch {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var parseInstant_default = parseInstant;
|
|
11
|
-
export {
|
|
12
|
-
parseInstant_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=parseInstant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/parseInstant.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\nconst parseInstant = (\n date: Temporal.Instant | string | null | undefined,\n): Temporal.Instant | null => {\n if (date === null || date === undefined) return null;\n try {\n return Temporal.Instant.from(date);\n } catch {\n return null;\n }\n};\n\nexport default parseInstant;\n"],"mappings":"AAAA,SAAS,gBAAgB;AAEzB,MAAM,eAAe,CACnB,SAC4B;AAC5B,MAAI,SAAS,QAAQ,SAAS,OAAW,QAAO;AAChD,MAAI;AACF,WAAO,SAAS,QAAQ,KAAK,IAAI;AAAA,EACnC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAO,uBAAQ;","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
const parsePlainDate = (date, options) => {
|
|
3
|
-
if (date === null || date === void 0) return null;
|
|
4
|
-
try {
|
|
5
|
-
return Temporal.PlainDate.from(date, options);
|
|
6
|
-
} catch {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var parsePlainDate_default = parsePlainDate;
|
|
11
|
-
export {
|
|
12
|
-
parsePlainDate_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=parsePlainDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/temporal/parsePlainDate.ts"],"sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\nconst parsePlainDate = (\n date: Temporal.PlainDate | string | null | undefined,\n options?: Temporal.AssignmentOptions,\n): Temporal.PlainDate | null => {\n if (date === null || date === undefined) return null;\n try {\n return Temporal.PlainDate.from(date, options);\n } catch {\n return null;\n }\n};\n\nexport default parsePlainDate;\n"],"mappings":"AAAA,SAAS,gBAAgB;AAEzB,MAAM,iBAAiB,CACrB,MACA,YAC8B;AAC9B,MAAI,SAAS,QAAQ,SAAS,OAAW,QAAO;AAChD,MAAI;AACF,WAAO,SAAS,UAAU,KAAK,MAAM,OAAO;AAAA,EAC9C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAO,yBAAQ;","names":[]}
|