/** * internal.ts — small helpers shared by the three modules. Not part of the * public API: `package.json` `exports` does not expose this file and no * module re-exports it. */ /** * A plain object or a null-prototype object: not an array, Map, Set, Date, * RegExp, function or class instance. A record made in another realm * (`node:vm`, an iframe) counts as plain, because its prototype is that * realm's `Object.prototype`, whose own prototype is `null`. */ export declare function isPlainRecord(value: unknown): value is Record; /** * Make a caller-supplied string safe to put in a sentence: newlines, tabs and * carriage returns become `\n`, `\t` and `\r`, and every other control, bidi * or format character becomes `\u{HEX}`. Ordinary text and non-ASCII letters * are left alone, so the output cannot start a new line, reorder the text * around it or send a terminal escape. */ export declare function escapeText(text: string): string; /** * Render a received value for an error message without ever throwing and * without calling into the value. Strings are quoted, escaped and cut at 80 * characters; numbers, booleans, null and undefined print as themselves; * bigint prints as `1n`; everything else is named by kind. Never calls * `toString`, `toJSON` or a getter, so a hostile value cannot change or break * the error that reports it. */ export declare function describe(value: unknown): string; /** * Whether `text` shows nothing: empty, or only whitespace and * Default_Ignorable_Code_Point characters (zero-width spaces, bidi controls, * the soft hyphen, variation selectors, Hangul fillers and similar). * `String.prototype.trim` alone misses the ignorable ones. */ export declare function isBlank(text: string): boolean; /** * Parse a strict ISO-8601 date-time that names its zone, to epoch milliseconds, * or return `undefined`. `Date.parse` is not used because it reads a string * without a zone as the machine's local time (so the same hold is live or * expired depending on the server's TZ), accepts non-ISO text such as `"2099"` * or `"Dec 25, 2099"`, and rolls impossible dates forward (`02-30` becomes * `03-02`, `T24:00` becomes the next day). Here the date and time must be real, * the separator `T` and the zone letter `Z` are upper case, and the offset has * a colon (`+05:30`). Fractional seconds beyond milliseconds are truncated. */ export declare function parseIsoInstant(text: string): number | undefined;