🔢 Powerfully handle the parsing of decimal numbers, grouped floats, and all sorts of other numbers.
This package provides a way to handle the parsing of decimal numbers, grouped floats, and all sorts of other numbers.
With NPM
npm install parse-grouped-float
With Yarn
yarn add parse-grouped-float
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
MIT © Jungsoft