1.0.1 • Published 7 years ago

commas v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

Commas

Add, Remove, Replace commas.

Installation

To install commas you need to use a node package manager as npm or yarn

    $ npm install commas --save
    # YARN 
    $ yarn add commas

Usage

See more in the example folder

const cm = require('commas');

let n = {
  wComma: "1,000,000",
  nComma: 1000000
}

n = cm.add(number.nComma);
//=> 1000000 to "1000000"
// return string

n = cm.remove(number.wComma);
//=> "1,000,000" to 1000000
// return number

n = cm.replace(number.wComma);
//=> "1,000,000" to 1.000.000
// return number