in-words

    0.2.2 • Public • Published

    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.1.0 (2014-02-16)

    • Added Polish locale
    • Made German locale work with much bigger numbers
    • Fixed German locale for numbers ending with 1

    v0.1.1 (2015-11-13)

    • Reflected my name change in documentation and links
    • Updated devDependencies
    • Added jshint

    v0.2.0 (2015-11-13)

    • Added example.js for npmjs.org tonic integration
    • Fixed 10 plus female noun in German locale
    • Fixed ?00 plus noun in German locale
    • Introduced Particle::asJoiner and Particle::asPrefix
    • Introduced Words
    • Removed Particles::getMembers

    v0.2.1 (2016-02-14)

    • Fixed English spelling for 18

    v0.2.2 (2017-04-21)

    • Fixed Polish spelling for all numbers with 9 (Thanks to Marek Mizier)

    Other packages

    The following packages do roughly the same:

    Author

    Adrian Heine.

    License

    Copyright 2013–2015 Adrian Heine.

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

    Install

    npm i in-words

    DownloadsWeekly Downloads

    49

    Version

    0.2.2

    License

    none

    Last publish

    Collaborators

    • avatar