npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

in-words

v0.2.3

Published

Convert numbers to words

Downloads

528

Readme

in words

Convert natural numbers (and 0) to words.

Usage

const inWordsDe = require('in-words').de;
inWordsDe('427534'); // => 'vierhundertsiebenundzwanzigtausendfünfhundertvierunddreißig'

const inWordsEn = require('in-words').en;
inWordsEn('427534'); // => 'four hundred twenty-seven thousand five hundred thirty-four'

const inWordsPl = require('in-words').pl;
inWordsPl('427534'); // => 'czterysta dwadzieścia siedem tysięcy pięćset trzydzieści cztery'

Todo

  • Support bigger numbers in german locale (http://de.wikipedia.org/wiki/Zahlennamen)
  • Write spanish version
  • Document de params
  • Document limits of de, en and pl
  • Make a correct param type with setParam method
  • Let two particles be able to join
  • words-to-number
    • https://npmjs.org/package/wtn
    • https://npmjs.org/package/numbered
    • https://npmjs.org/package/wordy

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)

v0.2.3 (2022-01-23)

  • Fixed English spelling for 1010

Other packages

The following packages do roughly the same:

  • https://npmjs.org/package/number-string-representation
  • https://npmjs.org/package/wtn
  • https://npmjs.org/package/numbered
  • https://npmjs.org/package/wordy
  • https://npmjs.org/package/slownie

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).