@nebius/js-sdk - v0.2.54
    Preparing search index...

    Parses duration strings that use Go's time.Duration syntax.

    The SDK uses this parser for CLI-compatible configuration values.

    Index
    • Parses duration strings that use Go's time.Duration syntax.

      The SDK uses this parser for CLI-compatible configuration values.

      Returns GolangDurationParser

    • Converts a duration to a non-negative integer number of milliseconds.

      A value can join several units, for example 1h30m or 250ms. Supported units are h, m, s, ms, us, µs, μs, and ns. A positive sub-millisecond duration rounds up to 1 ms.

      Parameters

      • name: string

        Identifies the setting in error messages.

      • value: string

      Returns number

      Error if the value is empty, negative, or invalid.