Benign javascript download unavailable

@cdx-ui/formatters 0.1.2

“![coverage](https://unpkg.com/@cdx-ui/formatters/coverage.svg)”

Calls an expect assertion matcherConstructs locale-aware date and time formatter
SHA-25642694c98b372b89e6d6e77dbc7b38e7e82b0f52e303e9b05f05afcc0cb4b1571

Evidence

Calls JSON.stringify() dateId.js · lines 1–48
⋯4 lines
5});
6exports.dateId = dateId;
7var _brand = require("../internal/brand");
8var _formatDateId = require("./formatDateId");
9var _isValidDateId = require("./isValidDateId");
10var _isValidDateParts = require("./isValidDateParts");
11/**
12 * Validating smart constructor for a wire {@link DateId} (`YYYY-MM-DD`).
13 *
14 * Accepts either a wire string or numeric parts. Throws `RangeError` on input
15 * that is not a real calendar date — use this at the boundary where you first
16 * introduce a date value so a bad id never enters your form state.
17 *
⋯26 lines
44 };
45 if (!(0, _isValidDateParts.isValidDateParts)(parts)) {
46 throw new RangeError(`Invalid DateId parts: ${JSON.stringify(parts)}.`);
47 }
48 return (0, _brand.asDateId)((0, _formatDateId.formatDateId)(parts));
Constructs locale-aware date and time formatter isLocaleHour12.js · lines 1–30
⋯5 lines
6exports.isLocaleHour12 = isLocaleHour12;
7/**
8 * Whether the given locale conventionally uses a 12-hour clock (AM/PM).
9 *
10 * Derived from the locale's resolved hour cycle so date-time components can
⋯6 lines
17function isLocaleHour12(locale) {
18 try {
19 const resolved = new Intl.DateTimeFormat(locale ?? 'en-US', {
20 hour: 'numeric'
21 }).resolvedOptions();
⋯6 lines
28 }
29}
30//# sourceMappingURL=isLocaleHour12.js.map
English function-word token "for" intlCopy.js · lines 28–29
28:32… el (AM/PM or locale equivalent) for a 0–23 hour value. */
29function formatDayPeriodFromHour(hour, …
Code has source map reference intlCopy.js · lines 49–72
⋯21 lines
70 return ' – ';
71}
72//# sourceMappingURL=intlCopy.js.map
Calls an expect assertion matcher getDateTimeFieldSegments.test.ts · lines 1–19
1import { getDateTimeFieldSegments } from '../dates/segments/getDateTimeFieldSegments';
2
3describe('getDateTimeFieldSegments', () => {
4 it('returns placeholder date-time segments when value is empty', () => {
5 const segments = getDateTimeFieldSegments(undefined, {
6 granularity: 'minute',
7 locale: 'en-US',
8 hour12: true,
9 });
10 expect(segments.find((s) => s.type === 'month')?.text).toBe('MM');
11 expect(segments.find((s) => s.type === 'hour')?.text).toBe('hh');
12 expect(segments.find((s) => s.type === 'hour')?.value).toBeUndefined();
13 expect(segments.find((s) => s.type === 'minute')?.text).toBe('mm');
14 expect(segments.find((s) => s.type === 'dayPeriod')?.text).toBe('AM');
15 });
16
17 it('returns 12-hour date-time field segments with day period', () => {
18 const segments = getDateTimeFieldSegments('2026-07-28T14:30', {
19 …

Showing the top 5 files — 3 more files (7 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.