Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uzmoi/clockwork-base32-ts
A fast and minimal implementation of Clockwork Base32 for TypeScript
https://github.com/uzmoi/clockwork-base32-ts
base32
Last synced: 27 days ago
JSON representation
A fast and minimal implementation of Clockwork Base32 for TypeScript
- Host: GitHub
- URL: https://github.com/uzmoi/clockwork-base32-ts
- Owner: uzmoi
- License: mit
- Created: 2024-11-19T14:35:31.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-20T12:14:08.000Z (about 1 month ago)
- Last Synced: 2024-11-20T12:44:43.511Z (about 1 month ago)
- Topics: base32
- Language: TypeScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clockwork-base32
[![NPM Version][npm-badge]](https://www.npmjs.com/package/@uzmoi/clockwork-base32)
[![JSR Version][jsr-badge]](https://jsr.io/@uzmoi/clockwork-base32)
[![License][license-badge]](https://opensource.org/license/MIT)
[![npm bundle size][bundle-size-badge]](https://bundlephobia.com/package/@uzmoi/clockwork-base32)[npm-badge]: https://img.shields.io/npm/v/@uzmoi/clockwork-base32?style=flat-square&logo=npm
[jsr-badge]: https://img.shields.io/jsr/v/@uzmoi/clockwork-base32?style=flat-square&logo=jsr
[license-badge]: https://img.shields.io/github/license/uzmoi/clockwork-base32-ts?style=flat-square
[bundle-size-badge]: https://img.shields.io/bundlephobia/min/@uzmoi/clockwork-base32?style=flat-squareA fast and minimal implementation of
[Clockwork Base32](https://gist.github.com/szktty/228f85794e4187882a77734c89c384a8)
for TypeScript.## Install
```sh
npm install @uzmoi/clockwork-base32
# or
deno add jsr:@uzmoi/clockwork-base32
```## Usage
```ts
import * as base32 from "@uzmoi/clockwork-base32";const array = Uint8Array.from("Hello, world!", (c) => c.charCodeAt());
base32.encode(array); // => "91JPRV3F5GG7EVVJDHJ22"
base32.decode("91JPRV3F5GG7EVVJDHJ22"); // => Same as `array`
```