Class RangeValue

Useful class to deal with range numbers

Hierarchy

  • RangeValue

Constructors

Properties

Methods

Constructors

  • Example

    const nb     = new RangeValue("..2")
    = new RangeValue("6")
    = new RangeValue("..-25..")

    Parameters

    • Optional value: string

      The init value of this range number

    Returns RangeValue

Properties

get: (() => string) = ...

Type declaration

    • (): string
    • Get the current formated value

      Returns string

value: string

Methods

  • The the range value lower than the given value

    Parameters

    • value: number

      The result will be lower than this value

    • Optional strict: boolean

      If strict, the given value will be excluded

    Returns RangeValue

  • The the range value upper than the given value

    Parameters

    • value: number

      The result will be upper than this value

    • Optional strict: boolean

      If strict, the given value will be excluded

    Returns RangeValue

Generated using TypeDoc