Stringifier overview
This module implements a PPStringifier, i.e. an object built from a PPParameters instance that converts any JavaScript value into a PPStringifiedValue. The stringification pipeline handles primitive values, non-primitive values (objects, arrays, maps, sets, functions…), depth limiting, bypass shortcuts, and circular-reference detection.
Table of contents
Constructors
make
Constructs a PPStringifier from a PPParameters instance
Signature
export declare const make: (parameters: PPParameters.Type) => Type
Equivalences
equivalence
Equivalence
Signature
export declare const equivalence: Equivalence.Equivalence<Type>
Models
Type (class)
Type that represents a PPStringifier
Signature
export declare class Type {
constructor(parameters: PPParameters.Type)
}
[MData.idSymbol] (method)
Returns the id of this
Signature
[MData.idSymbol](): string | (() => string)
[Hash.symbol] (method)
Calculates the hash value of this
Signature
[Hash.symbol](): number
[MEquivalenceBasedEqualityData.isEquivalentToSymbol] (method)
Function that implements the equivalence of this and that
Signature
[MEquivalenceBasedEqualityData.isEquivalentToSymbol](this: this, that: this): boolean
[MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol] (method)
Predicate that returns true if that has the same type marker as this
Signature
[MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol](that: unknown): boolean
id (property)
Id of this PPStringifier. Derived from the id of the PPParameters used to build it
Signature
readonly id: string
stringify (property)
Function that converts any JavaScript value into a PPStringifiedValue. Handles the full stringification pipeline: primitive formatting, bypass shortcuts, depth limiting, circular- reference detection, property extraction, filtering, sorting, and final assembly.
Signature
readonly stringify: MTypes.OneArgFunction<unknown, [ASText.Type, ...ASText.Type[]]>
Module markers
moduleTag
Module tag
Signature
export declare const moduleTag: "@parischap/pretty-print/stringification/Stringifier/"