Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hazae41/base64

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hazae41/base64

Base64 adapter for WebAssembly and JS implementations

  • 1.0.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67
increased by21.82%
Maintainers
0
Weekly downloads
 
Created
Source

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())

WebAssembly

npm i @hazae41/base64.wasm
import { Base64 } from "@hazae41/base64"
importBase64Wasm } from "@hazae41/base64.wasm"

await Base64Wasm.initBundled()

Base64.set(Base64.fromBufferOrWasm(Base64Wasm))

Scure (JavaScript)

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

Base64.set(Base64.fromBufferOrScure(Scure))

Usage

const encoded: string = Base64.get().getOrThrow().encodePaddedOrThrow(new Uint8Array([1,2,3,4,5]))
using decoded: Copiable = Base64.get().getOrThrow().decodePaddedOrThrow(encoded)
const decoded2: Uint8Array = decoded.bytes.slice()

Keywords

FAQs

Package last updated on 31 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc