# english-number

> Using a well-crafted stack structure that abstracts generically across languages.

Latest version **1.0.1** (published 2019-11-01) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install english-number
pnpm add english-number
yarn add english-number
bun add english-number
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-11-01 |
| First published | 2019-10-21 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Liam Norris |
| Maintainers | timeemit |
| Keywords | number, english |

## Links

- npm: https://www.npmjs.com/package/english-number
- Repository: https://github.com/number-reference/english-number
- Homepage: https://github.com/number-reference/english-number#readme
- Issues: https://github.com/number-reference/english-number/issues
- npm.io page: https://npm.io/package/english-number

## Dependencies (1)

- [abstract-numerical-unit](https://npm.io/package/abstract-numerical-unit.md) ^1.4.2

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-11-01
- 1.0.0 — 2019-10-21

## README

# Convert Numbers into English

Using a well-crafted stack structure that abstracts generically across languages.

## Installation

```
npm install english-number
```

## Usage

```
const EnglishNumber = require('english-number');
```

Pass any decimal representation of a number:

```
EnglishNumber.nameOf(1521.12); // => "One Thousand Five Hundred and Twenty-One plus Twelve Hundredths"
EnglishNumber.nameOf("40001.7"); // => "Forty Thousand One plus Seven Tenths"
```

Count off with `order()`

```
EnglishNumber.orderOf(208); // => "Two Hundredth and Eighth"
```

Or, if you're working with ratios and want to avoid repeating decimals:

```
EnglishNumber.nameOfRatio(7, 2); // "Seven Halves"
EnglishNumber.nameOfRatio(10, 3); // "Ten Thirds"
```

## Tests

More than 200 [Jasmine](https://jasmine.github.io) specs that handle the many irregularities of the English language

```
npm test
```

## Limitations

Support is limited to numbers not greater in magnitude than one vigintillion (+/- 10^63) and with resolution limited to the vigintillionth (10^-63).

# Motivation & Related Work

[Number Reference](www.number-reference.com) is an online encyclopedia of calculations that relies heavily on this and related packages.

This is an iteration over [an inferior package](https://github.com/number-reference/number-to-english).

---
_Source: https://npm.io/package/english-number · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
