1.0.18 • Published 11 months ago

@hazae41/base16 v1.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Base16

Base16 adapter for WebAssembly and JS implementations

npm i @hazae41/base16

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Getting started

Buffer (NodeJS)

import { Base16 } from "@hazae41/base16"

Base16.set(Base16.fromBuffer())

WebAssembly

npm i @hazae41/base16.wasm
import { Base16 } from "@hazae41/base16"
import { Base16Wasm } from "@hazae41/base16.wasm"

await Base16Wasm.initBundled()

Base16.set(Base16.fromBufferOrWasm(Base16Wasm))

Scure (JavaScript)

npm i @scure/base
import { Base16 } from "@hazae41/base16"
import * as Scure from "@scure/base"

Base16.set(Base16.fromBufferOrScure(Scure))

Usage

const encoded: string = Base16.get().getOrThrow().encodeOrThrow(new Uint8Array([1,2,3,4,5]))
using decoded: Copiable = Base16.get().getOrThrow().decodeOrThrow(encoded)
const decoded2: Uint8Array = decoded.bytes.slice()
1.0.18

11 months ago

1.0.17

1 year ago

1.0.16

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.11

2 years ago

1.0.10

2 years ago

1.0.9

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

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago