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

b64ab

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b64ab

Convert between Base-64 Strings and ArrayBuffer Objects. Simple. Isomorphic. Light-weight.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
103
decreased by-42.78%
Maintainers
1
Weekly downloads
 
Created
Source

b64ab

install

npm install b64ab

usage

import { toBase64String, toArrayBuffer } from "b64ab";

// create an Array Buffer
const ab = Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).buffer;

// convert an Array Buffer to a Base-64 String
toBase64String(ab);
"AQIDBAUGBwgJCg=="

// convert a Base-64 String to an Array Buffer
toArrayBuffer("AQIDBAUGBwgJCg==")
ArrayBuffer {
  [Uint8Contents]: <01 02 03 04 05 06 07 08 09 0a>,
  byteLength: 10
}

Keywords

FAQs

Package last updated on 13 May 2023

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