Skip to content

valepresente/numbers-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NumbersUtils.js

A great coffee utils to work with numbers.

Signatures

First, the programmer needs to instanciate NumbersUtils class.

NumbersUtils = require 'numbers-utils'
numberUtils = new NumberUtils

In sequence, the result object has the follow methods

.toFloat(amount)

numberUtils.toFloat '11.2'
-> 11.2
numberUtils.toFloat '3,000.00'
-> 3000

.toCurrency(amount, precision)

numberUtils.toCurrency 21202001201.2, 4
-> '21,202,001,201.20000'

Developers

To compile and distribute version of NumberUtils, some pré-requisites needle:

  • make
  • nodejs
  • npm
  • coffee-script npm install -g coffee-script
  • uglyfi npm install -g uglify-js

To compile source, just make deploy must be executed.

Testing

jasminejs is used as BDD suite. To run all tests just execute make test or npm test.

Contributors

Igor Escobar @igorescobar

Michael Granados @dgmike

Copyright (c) 2014 Vale Presente. This software is licensed under the MIT License.

About

A great utils to work with numbers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published