Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including count with all npm packages installed. Try it out:

var count = require("count")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

count v0.1.4

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

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.

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.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free