@hazae41/base64
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

Base64

Base64 adapter for WebAssembly and JS implementations

npm i @hazae41/base64

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Getting started

Buffer (NodeJS)

import { Base64 } from "@hazae41/base64"

Base64.set(Base64.fromBuffer())

Alocer (WebAssembly)

npm i @hazae41/alocer
import { Base64 } from "@hazae41/base64"

Base64.set(await Base64.fromBufferOrAlocer())

Scure (JavaScript)

npm i @scure/base
import { Base64 } from "@hazae41/base64"

Base64.set(Base64.fromBufferOrScure())

Usage

Direct

const encoded: string = Base64.get().tryEncodePadded(new Uint8Array([1,2,3,4,5])).unwrap()
const decoded: Uint8Array = Base64.get().tryDecodePadded(encoded).unwrap().copyAndDispose()

/@hazae41/base64/

    Package Sidebar

    Install

    npm i @hazae41/base64

    Weekly Downloads

    2

    Version

    1.0.10

    License

    MIT

    Unpacked Size

    103 kB

    Total Files

    49

    Last publish

    Collaborators

    • hazae41