@cowwoc/requirements - v4.0.12
    Preparing search index...

    Class StringMappers

    Returns the String representation of an object.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates a new instance. If typeToMapper is undefined the new instance uses the default mappings. Otherwise, it contains a copy of the typeToMapper mappings.

      Parameters

      • OptionaltypeToMapper: Map<Type, StringMapper>

        a mapping from the name of a type to the string representation of its values

      Returns StringMappers

      TypeError if typeToMapper is undefined or null

    Properties

    typeToMapper: Map<Type, StringMapper>
    DEFAULT: StringMappers = ...

    The default mapper configuration.

    Methods

    • Returns the string representation of the mappers.

      Returns string

      the string representation of the mappers

    • Returns the string representation of a value using the mappers.

      Parameters

      • value: unknown

        a value

      Returns string

      the string representation of the value