# custom-numeral-system

> Create encoder/decoder for a custom numeral system.

Latest version **1.0.1** (published 2019-10-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install custom-numeral-system
pnpm add custom-numeral-system
yarn add custom-numeral-system
bun add custom-numeral-system
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-10-02 |
| First published | 2019-10-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jeremy Greer |
| Maintainers | reergymerej |
| Keywords | base, base62, numeral, radix, system |

## Links

- npm: https://www.npmjs.com/package/custom-numeral-system
- npm.io page: https://npm.io/package/custom-numeral-system

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-10-02
- 1.0.0 — 2019-10-02

## README

# custom-numeral-system

[![Build Status](https://travis-ci.org/reergymerej/custom-numeral-system.svg?branch=master)](https://travis-ci.org/reergymerej/custom-numeral-system)

Create encoder/decoder for a custom [numeral
system](https://en.wikipedia.org/wiki/Numeral_system).

## Examples

```js
import {
  getSeriesEncoder,
  getSeriesDecoder,
} from 'custom-numeral-system'

const series = 'asdf'
const encode = getSeriesEncoder(series)

encode.radix // 4
encode.series // 'asdf'
encode(42) // 'ddd'

const decode = getSeriesDecoder(series)
decode('ddd') // 42
```

Don't be afraid to get weird.
```js
const series = 'Hi, ma!'
const decode = getSeriesDecoder(series)

decode('!H') // 42

// make your own binary
getSeriesEncoder('🧐💥')(10) // '💥🧐💥🧐'
```

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