Socket
Socket
Sign inDemoInstall

b64ab

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    b64ab

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


Version published
Maintainers
1
Install size
10.3 kB
Created

Readme

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

Last updated on 13 May 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc