bothy-sdk
    Preparing search index...

    Function parseDuration

    • Parses a duration of the configuration reference into milliseconds.

      Parameters

      • text: string

        A number with one of the units ms, s, m or h, for example "500ms".

      Returns number

      The duration in milliseconds.

      RangeError when the text is not such a duration.

      parseDuration("2m"); // 120000