A tiny javascript library to count in natural language e.g. Zero, One, Two, Three .. up to 999,999,999,999,999.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks
min
tasks
test
.gitignore
.jscs.json
.npmignore
.spmignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
Gruntfile.js
LICENSE
README.md
bower.json
component.json
composer.json
count.js
ender.js
package.js
package.json

README.md

NPM version NPM downloads MIT License Build Status

A tiny javascript library to count in natural language e.g. Zero, One, Two, Three.. up to 999,999,999,999,999.

JavaScript count in natural language e.g. Zero, One, Two, Three, and beyond.

Available client-side via Bower:

bower install count

Available server-side via NPM:

npm install count

Open Source: https://github.com/charneykaye/count

Count.js is freely distributable under the terms of the MIT license.

Documentation

Basic Usage

Here's all this does so far:

// Factory's name will be "FactoryFive"
_n = 'Factory' + count(5).camel();

// Unit tests
test.equal(count(764).camel(), '"SevenHundredSixtyFour"');    
test.equal(count(999999999999999).camel(), 'NineHundredNinetyNineTrillionNineHundredNinetyNineBillionNineHundredNinetyNineMillionNineHundredNinetyNineThousandNineHundredNinetyNine');

Changelog

Contributing

License

Count.js is freely distributable under the terms of the MIT license.