npm.io
1.0.1 • Published 9 years ago

uint-to-words

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0

uint-to-words

Converts unsigned integers into english words

Install

npm i uint-to-words --save

Usage

with Typescript

import { uintToWords } from 'uint-to-words';

console.log(uintToWords(101));
// "one hundred and one"

with Javascript

const { uintToWords } = require('uint-to-words');

console.log(uintToWords(101));
// "one hundred and one"

Limitations

Currently supports integers 0 - 999,999,999. Will throw RangeError if out of range, or TypeError if input is not an int.