node-cooper - v0.2.0
    Preparing search index...

    Function parseDuration

    • Parses a duration literal's text into total nanoseconds (CASC.md ยง6.8). The lexer's token shape is deliberately permissive; this is where the real rules are enforced -- a single-unit literal may be fractional (scaled exactly at any size, scaled); a compound literal's components must be plain integers, strictly descending, no unit repeated.

      Parameters

      • text: string

      Returns string | bigint

      nanoseconds, or an error message