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

https://github.com/fasttime/number-name

Number to words converter
https://github.com/fasttime/number-name

Last synced: 7 months ago
JSON representation

Number to words converter

Awesome Lists containing this project

README

          

# Number Name

A library to convert numbers to their English names.

## Setup Instructions

### In the Browser

To use the Number Name Library in your project, download
[number-name.js](https://github.com/fasttime/Number-Name/blob/master/lib/number-name.js) or
[number-name.min.js](https://github.com/fasttime/Number-Name/blob/master/lib/number-name.min.js)
from GitHub and include it in your HTML file.

```html

```

Alternatively, you can hotlink the online file.

```html

```

## Usage

```js
var name = numberName(12345);
// twelve thousand three hundred forty-five
```

```js
var name = numberName(-Math.PI);
// minus three point one four one five nine two six five three five eight nine seven nine
```

```js
var name = numberName(1e42);
// one tredecillion
```

*This is a preliminary documentation and may be subject to change at any time.*