Skip to main content

Module value

Module value 

Source
Expand description

The ParseValue model: every JSON value a client can send or receive in an object body.

Two decisions here are load-bearing, and both look like mistakes until the reason is stated.

ParseMap preserves key order. Several upstream behaviors iterate object keys, and the resulting order is observable in golden-file comparison even where it is not semantically meaningful. A HashMap destroys it on every round trip and makes snapshot testing impossible.

Nothing here derives PartialEq. A derived one would compile, read as correct, and get both float edge cases backwards at the one call site that decides which keys a client is told about. Use deep_strict_eq, which implements Node’s util.isDeepStrictEqual semantics.

Enums§

ParseValue
A Parse value.

Functions§

deep_strict_eq
Deep equality with Node’s util.isDeepStrictEqual semantics.

Type Aliases§

ParseMap
An order-preserving string-keyed map. See the module note.