An open API service indexing awesome lists of open source software.

https://github.com/andreruffert/number-words

πŸ’― πŸ’¬ Convert a number into words
https://github.com/andreruffert/number-words

converter javascript number-to-words

Last synced: 3 months ago
JSON representation

πŸ’― πŸ’¬ Convert a number into words

Awesome Lists containing this project

README

        

# number-words

[![CI Status](https://github.com/andreruffert/number-words/workflows/CI/badge.svg)](https://github.com/andreruffert/number-words/actions?query=workflow%3ACI)
[![npm version](https://img.shields.io/npm/v/number-words.svg)](https://www.npmjs.com/package/number-words)
[![npm](https://img.shields.io/npm/dm/number-words?logo=npm)](https://www.npmjs.com/package/number-words)

> Convert a number into words

## Install

```
$ npm install --save number-words
```

## Usage

```js
const numberWords = require('number-words');

numberWords.convert(42);
//=> 'fourty two'

numberWords.convert(101);
//=> 'one hundred and one'

numberWords.convert(31.41);
//=> 'thirty one'
```

## API

### numberWords.convert(number)

#### number

Type `number`

Number to convert into words.

## License

MIT Β© [AndrΓ© Ruffert](http://andreruffert.com)