Class BaseConverter

The class from which to create a BaseConverter instance for encoding to the NumeralOutput.

Hierarchy

  • BaseConverter

Constructors

Properties

Instance Methods

Constructors

  • The constructor of the BaseConverter class.

    Parameters

    • base: number

      The base number.

    • options: BaseConverterOptions = {}

      Optional parameters, for adjusting conversion rules.

    Returns BaseConverter

Properties

base: number

The base number

properties: Required<BaseConverterOptions>

The properties of the class, set by the options of the constructor

Instance Methods

  • Decode an encoded number.

    Parameters

    Returns number

    The decoded number.

  • Encodes the specified number according to the instance base and properties.

    Parameters

    • numberValue: string | number | Decimal

      The number to encode, as a number, string or Decimal type.

    • Optional options: BaseConverterOptions

      The options to use as conversion rules.

    Returns NumeralOutput

    The encoded number as a NumeralOutput object.

Generated using TypeDoc