/parse-grouped-float

🔢 Powerfully handle the parsing of decimal numbers, grouped floats, and all sorts of other numbers.

Primary LanguageTypeScriptMIT LicenseMIT

NPM Languages Stars Forks Contributors

🔢 Powerfully handle the parsing of decimal numbers, grouped floats, and all sorts of other numbers.

Parse Grouped Float

This package provides a way to handle the parsing of decimal numbers, grouped floats, and all sorts of other numbers.

Installation

With NPM

npm install parse-grouped-float

With Yarn

yarn add parse-grouped-float

Usage

import parseGroupedFloat from "parse-grouped-float";

parseGroupedFloat("11,11"); // results to 11.11
parseGroupedFloat("11.11"); // results to 11.11
parseGroupedFloat("11,000"); // results to 11
parseGroupedFloat("11,000.1"); // results to 11000.1
parseGroupedFloat("11,000.12"); // results to 11000.12
parseGroupedFloat("11..00"); // results to 11
parseGroupedFloat("11,,00"); // results to 11
parseGroupedFloat("42.01690672268907563025210084"); // results to 42.01690672268908

Made possible by

License

MIT © Jungsoft