mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
Each limitations partial held its whole text on one line (map-and-set.mdx was a single 1,080-character line), so any two edits to the same partial conflicted. The partials now put one sentence per line, with a bullet's continuation lines indented two spaces. Markdown joins the lines, so the rendered pages are unchanged. scripts/limitations-partials.mjs reads a labeled bullet's indented continuation lines as part of the bullet when it splits and joins the page, and AGENTS.md states the convention.
13 lines
863 B
Plaintext
13 lines
863 B
Plaintext
Function replacers and two-argument revivers support nested replacements, object-property deletion, and thrown exceptions.
|
|
Omitting the root through a replacer returns `undefined`.
|
|
Array replacers list the object keys to serialize, as in Node.js.
|
|
Stored `JSON.stringify` functions accept numeric and string indentation; direct calls require literal indentation.
|
|
|
|
Reviver source contexts are unsupported.
|
|
A reviver that deletes an array element throws, because checked arrays cannot represent holes.
|
|
|
|
Callback values use checked storage.
|
|
Typed records and arrays retain identity and mutations; record fields use declaration order; typed-array views retain backing storage and brands.
|
|
`Buffer.isBuffer` preserves the Buffer brand through `unknown`.
|
|
JavaScript callbacks receive the holder as `this`; TypeScript callbacks that access dynamic `this` are unsupported.
|