
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
@hexagon/base64-arraybuffer
Advanced tools
Encode/decode base64 and base64url data into ArrayBuffers
Encode/decode base64 or base64url data into ArrayBuffers.
This is basically github.com/niklasvh/base64-arraybuffer, but with added base64url support.
You can install the module via npm:
npm install @hexagon/base64-arraybuffer
const base64 = require('@hexagon/base64-arraybuffer');
const result = base64.encode("Hello World!");
const resultUrl = base64.encode("Hello World!", true);
www.jsdelivr.com/package/npm/@hexagon/base64-arraybuffer?path=dist
In a browser, you normally want /dist/base64-arraybuffer.umd.js
which will register a global object named base64
// Global object base64 available
const result = base64.encode("Hello World!");
const resultUrl = base64.encode("Hello World!", true);
The library encodes and decodes base64/base64url to and from ArrayBuffers
encode(buffer) - Encodes ArrayBuffer
into base64 string
decode(str) - Decodes base64 string to ArrayBuffer
encode(buffer, true) - Encodes ArrayBuffer
into base64url string
decode(str, true) - Decodes base64url string to ArrayBuffer
You can run the test suite with:
npm test
Copyright (c) 2021 Hexagon Licensed under the MIT license.
Copyright (c) 2012 Niklas von Hertzen Licensed under the MIT license.
FAQs
Encode/decode base64 and base64url data into ArrayBuffers
The npm package @hexagon/base64-arraybuffer receives a total of 5 weekly downloads. As such, @hexagon/base64-arraybuffer popularity was classified as not popular.
We found that @hexagon/base64-arraybuffer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.