/base37

A one-way binary-to-text encoding algorithm

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

base37

A one-way binary-to-text encoding algorithm.

Build Status npm bundle size (minified + gzip) npm GitHub issues GitHub closed issues GitHub

Table of contents

Features

  • No ambiguous characters
  • Easy to spell out
  • Easy to read
  • Completly URL-safe
  • Mobile-friendly
    • A base37 string can be selected completely in one go

Installation

Installation for Node.js

npm i base37 --save

Installation for browsers

Include this line in your HTML (preferably in the body) and you can obtain base37 via the jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/base37"></script>

or the unpkg CDN:

<script src="https://unpkg.com/base37"></script>

or you can download the latest version of base37 here.

Usage

Usage in Node.js

const base37 = require("base37");

console.log(base37.encode("Hello World!"));
//=> "zryy0wd03yqx"

Usage in browsers

console.log(base37.encode("Hello World!"));
//=> "zryy0wd03yqx"

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL-3.0 License - see here for more details.