1.0.20 • Published 10 months ago
@hazae41/base64url v1.0.20
Base64Url
Base64Url adapter for WebAssembly and JS implementations
npm i @hazae41/base64urlFeatures
Current features
- 100% TypeScript and ESM
- No external dependencies
Getting started
Buffer (NodeJS)
import { Base64Url } from "@hazae41/base64url"
Base64Url.set(Base64Url.fromBuffer())WebAssembly
npm i @hazae41/base64.wasm"import { Base64Url } from "@hazae41/base64url"
import { Base64Wasm } from "@hazae41/base64.wasm"
await Base64Wasm.initBundled()
Base64Url.set(Base64Url.fromBufferOrWasm(Base64Wasm))Scure (JavaScript)
npm i @scure/baseimport { Base64Url } from "@hazae41/base64url"
import * as Scure from "@scure/base"
Base64Url.set(Base64Url.fromBufferOrScure(Scure))Usage
const encoded: string = Base64Url.get().getOrThrow().encodeUnpaddeOrThrow(new Uint8Array([1,2,3,4,5]))
using decoded: Copiable = Base64Url.get().getOrThrow().decodeUnpaddedOrThrow(encoded)
const decoded2: Uint8Array = decoded.bytes.slice()1.0.19
10 months ago
1.0.18
11 months ago
1.0.20
10 months ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.9
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.15
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.0
3 years ago