Expand description
The value shape validates: what JSON can carry, plus the four things the
canonical behaviour needs and JSON cannot say (an absent value, NaN, a
date, a bigint), with object keys in insertion order.
Enums§
- Value
- A value under validation, or produced by it.
Constants§
- ERR_
VALUE_ LIMIT - The limit a rendered value is clipped to in a message.
Functions§
- is_
integer - Whether a number is an integer as
Number.isIntegerjudges it. - js_
date_ string - A date as
Date.prototype.toISOStringprints it: UTC, millisecond precision. - js_
number - A number as JavaScript’s
Number.prototype.toStringprints it: the shortest digits that read back as the same double, an integer without a point, an exponent below 1e-6 and from 1e21. - json_
render - A value as
JSON.stringifyprints it after shape’s replacer: keys in insertion order, no spaces,NaNas the text NaN, an undefined element as null and an undefined property omitted, a date as its ISO text. - json_
text - A string as
JSON.stringifyprints it, quotes included: no HTML escaping. - truncate_
text - Clip a rendering to
limitcharacters, the last three an ellipsis. - value_
kind - The kind a message calls a value: “value” for nothing, null or NaN,
otherwise its
typeof, with arrays told from objects. - value_
to_ string - A value as a message names it: its JSON with the quotes stripped, clipped.
Type Aliases§
- Map
- An object: keys in insertion order, as a JavaScript object keeps them.