# simple-base

> A simple base36/base58 converter.

Latest version **1.0.0** (published 2019-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-base
pnpm add simple-base
yarn add simple-base
bun add simple-base
```

## 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.0 |
| Published | 2019-03-04 |
| First published | 2017-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | GPlane |
| Maintainers | gplane |

## Links

- npm: https://www.npmjs.com/package/simple-base
- Repository: https://github.com/g-plane/simple-base
- Homepage: https://github.com/g-plane/simple-base#readme
- Issues: https://github.com/g-plane/simple-base/issues
- npm.io page: https://npm.io/package/simple-base

## Recent versions

- 1.0.0 (latest) — 2019-03-04
- 0.2.1 — 2018-05-06
- 0.2.0 — 2017-10-22
- 0.1.0 — 2017-10-22

## README

# Simple Base

![Azure Pipelines](https://flat.badgen.net/azure-pipelines/G-Plane/G-Plane/g-plane.simple-base)

Simple Base is a simple library to encode or decode with base36/base58.

It is available both in Node and browsers.

## Installation

```bash
yarn add simple-base
```

or

```bash
npm i simple-base
```

You also can link it by `script` tag in HTML. `SimpleBase` will be a global variable.

## Usage

Use CommonJS:

```javascript
const SimpleBase = require('simple-base')
```

Use ES2015 Modules:

```javascript
import * as SimpleBase from 'simple-base'
```

### Base36

Encoding:

```javascript
const encoded = SimpleBase.encode('hello', 36)
// or
const encoded = SimpleBase.base36.encode('hello')
```

Decoding:

```javascript
const decoded = SimpleBase.decode('5pzcszu7', 36)
// or
const decoded = SimpleBase.base36.decode('5pzcszu7')
```

### Base58

Encoding:

```javascript
const encoded = SimpleBase.encode('hello', 58)
// or
const encoded = SimpleBase.base36.encode('hello')
```

Decoding:

```javascript
const decoded = SimpleBase.decode('Cn8eVZg', 58)
// or
const decoded = SimpleBase.base36.decode('Cn8eVZg')
```

## License

MIT License © [Pig Fang](https://gplane.win/)

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