# number-to-alphabet

> Simple library to convert a number to sequence of letters and vice versa.

Latest version **1.0.0** (published 2019-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install number-to-alphabet
pnpm add number-to-alphabet
yarn add number-to-alphabet
bun add number-to-alphabet
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-08-26 |
| First published | 2019-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Tom Jenkinson |
| Maintainers | tjenkinson |
| Keywords | alphabet, number, sequence, numeric |

## Links

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

## 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.0 (latest) — 2019-08-26

## README

# Number-To-Alphabet
Convert a number to a string and vice versa, using the provided alphabet (or default of a-z).

## Installation
```shell
$ npm install number-to-alphabet
```

## Examples

```ts
import { NumberToAlphabet } from 'number-to-alphabet';

const defaultAlphabet = new NumberToAlphabet();
defaultAlphabet.numberToString(1);    // 'a'
defaultAlphabet.numberToString(2);    // 'b'
defaultAlphabet.numberToString(27);   // 'aa'
defaultAlphabet.numberToString(28);   // 'ab'
defaultAlphabet.stringToNumber('ab'); // 28

const customAlphabet = new NumberToAlphabet(['A', 'B']);
customAlphabet.numberToString(1);    // 'A'
customAlphabet.numberToString(2);    // 'B'
customAlphabet.numberToString(3);    // 'AA'
customAlphabet.numberToString(4);    // 'AB'
customAlphabet.stringToNumber('AB'); // 4
```

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