1.1.0 • Published 6 years ago

nummern v1.1.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

Nummern

:information_source: About

This NodeJS package allows you to convert numbers to text. It will spell out the whole numbers.

(Nummern is german for 'Numbers')

123 -> one hundred twenty-three 2.5 -> two point five one -40 -> minus forty

:postbox: NPM

npm.io

:wrench: Installation

npm i nummern

:white_check_mark: Features

LanguageIncluded
English:heavy_check_mark:
German:heavy_check_mark:
Bosnian (experimental):heavy_check_mark:
  • Error handling
  • Multiple Languages
  • Point numbers
  • Negative numbers
  • zero dependencies

:bulb: Usage

Convert:

nummern(<number>, <optional: language>);

Returns the text as string If no language is specified, english is used.

Example:

var nr = require("nummern");

console.log(nr(100));
// => "one hundred"

console.log(nr(1, "german"));
// => "eins"

console.log(nr(201.045, "english"));
// => "one hundred twenty-two point zero four five"

console.log(nr(12, "bosnian"));
// => "dvanaest"

:copyright: Copyright

Copyright (c) 2017 NullDev