Neptunium, Promethium, Manganese

    simple-parse-number

    0.1.1 • Public • Published

    A simple clean way to parse numbers with Javascript

    Setup

    npm install simple-parse-number

    Usage

    var parseNumber = require('simple-format-number');
     
    parseNumber('1,000.342'); // => 1000.342
    parseNumber('1.000,342', { decimal: ',', grouping: '.' }); // => 1000.342 (italian format)

    API

    parseNumber(string, options)

    where:

    • number the number to format
    • options (compatible with the symbols option of simple-format-number)
      • decimal the decimal symbol (default .)
      • grouping the grouping symbol (default ,)

    Keywords

    Install

    npm i simple-parse-number

    DownloadsWeekly Downloads

    4

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • gcanti