Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Convert numbers to words
JavaScript
Branch: master
Failed to load latest commit information.
locale Add polish locale
test Add polish locale
README.md v0.0.3
index.js Add polish locale
package.json v0.0.3
particles.js Cache Particles::toString return value
utils.js Make bigger numbers work in german locale

README.md

in words

Convert natural numbers (and 0) to words.

Usage

var inWordsDe = require('in-words').de;
inWordsDe('427534'); // => 'vierhundertsiebenundzwanzigtausendfünfhundertvierunddreißig'
var inWordsEn = require('in-words').en;
inWordsEn('427534'); // => 'four hundred twenty-seven thousand five hundred thirty-four'
var inWordsPl = require('in-words').pl;
inWordsPl('427534'); // => 'czterysta dwadzieścia siedem tysięcy pięćset trzydzieści cztery'

Todo

Changes

v0.0.1 (2013-06-21)

  • Initial version with basic German locale

v0.0.2 (2013-08-14)

  • Added basic English locale
  • Moved most of the string manipulation into an abstract ./particles.js

v0.0.3 (2014-02-16)

  • Added Polish locale
  • Make German locale work with much bigger numbers
  • Fix German locale for numbers ending with 1

Other packages

The following packages do roughly the same:

Author

Adrian Lang.

License

Copyright 2013–2014 Adrian Lang.

Licensed under the Apache License, Version 2.0. See (http://www.apache.org/licenses/LICENSE-2.0).

Something went wrong with that request. Please try again.