Base62.js
base62 encode/decode library
Install / Use
/learn @sasaplus1/Base62.jsREADME
base62.js
base62 encode/decode library
Installation
npm
$ npm install base62.js
yarn
$ yarn add base62.js
Usage
node.js
const base62 = require('base62.js');
browser
<script src="base62.min.js"></script>
if use in Internet Explorer, base62.js needs Number.isSafeInteger polyfill:
<script src="https://polyfill.io/v3/polyfill.min.js?features=Number.isSafeInteger"></script>
<script src="base62.min.js"></script>
Example
base62.encode(39134); // "abc"
base62.decode('abc'); // 39134
const originalTable = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
base62.encode(39134, originalTable); // "ABC"
base62.decode('ABC', originalTable); // 39134
Functions
see documents
License
The MIT license.
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
