json-fs-query
    Preparing search index...

    Function parseNumber

    • Read one number literal's text (see numberSource) as a number, refusing any it can't hold exactly as written: a whole number past Number.MAX_SAFE_INTEGER, however it is written (9007199254740993, 9007199254740993.0, 1e20), may be stored rounded (9007199254740993 as 9007199254740992), and a number too big for a double reads as Infinity, which JSON writes back as null. Fractions are kept as the nearest double, as JSON does (an exact decimal type is planned).

      Parameters

      • text: string

      Returns number

      For an integer past Number.MAX_SAFE_INTEGER, or a number too big for a double.