You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

numeric-quantity

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

numeric-quantity - npm Package Versions

23

2.1.0

Diff
j
jakeboone02
published 2.1.0 •

Changelog

Source

[v2.1.0] - 2025-06-09

Added

  • bigIntOnOverflow option will produce a bigint value if the input represents a valid integer greater than Number.MAX_SAFE_INTEGER or less than Number.MIN_SAFE_INTEGER.
j
jakeboone02
published 2.0.1 •

Changelog

Source

[v2.0.1] - 2024-01-15

Fixed

  • Corrected links in package.json to distributed type definition files.
j
jakeboone02
published 2.0.0 •

Changelog

Source

[v2.0.0] - 2023-06-16

Changed

  • [#26] numericQuantity is now a named export; there is no default export.
  • [#26] UMD build assigns all exports, including numericQuantity, to the global object NumericQuantity. Previously, it assigned the main function to the global namespace as numericQuantity.

Added

  • [#26] Support for comma (',') and underscore ('_') separators within Arabic numeral sequences. If a numeric sequence has a leading or trailing separator, that sequence will be considered invalid. This will cause numericQuantity to return NaN unless allowTrailingInvalid is true (see next item), in which case the sequence in question and everything after it will be ignored.
  • [#26] Options object as optional second parameter. Accepts the following options:
    • allowTrailingInvalid (boolean, default false): Allows numericQuantity to more closely resemble the behavior of parseFloat by accepting and ignoring everything from the first invalid character to the end of the string.
    • romanNumerals (boolean, default false): Enables support for Roman numerals with modern, strict rules, including the Unicode code points U+2160 through U+217F. Roman numerals will only be parsed if an attempt to parse the string based on Arabic numerals fails. To parse Roman numerals unconditionally, call parseRomanNumerals directly.
    • round (number | false, default 3): Rounds the result to the specified number of decimal places. Use round: false to avoid rounding.
  • [#26] Support for Unicode "Fraction Numerator One" code point ('⅟', U+215F), which must be followed by a numeric sequence (the denominator) to be considered part of a valid fraction representation.
  • [#26] Named exports of internal utilities like regular expressions, character maps, types, etc.
  • [#26] Build with tsup.
j
jakeboone02
published 2.0.0-beta.3 •
j
jakeboone02
published 2.0.0-beta.2 •
j
jakeboone02
published 2.0.0-beta.1 •
j
jakeboone02
published 2.0.0-beta.0 •
j
jakeboone02
published 1.0.4 •

Changelog

Source

[v1.0.4] - 2022-04-16

Fixed

j
jakeboone02
published 1.0.3 •

Changelog

Source

[v1.0.3] - 2022-04-16

Added

j
jakeboone02
published 1.0.2 •

Changelog

Source

[v1.0.2] - 2021-08-23

Added

  • [#21] Support for Unicode fraction slash (, U+2044).