Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Binary converters for Blob, Uint8Array, ReadableStream, ArrayBuffer, string in JavaScript/TypeScript
Binary converters for Blob, Uint8Array, ReadableStream, ArrayBuffer, string in JavaScript/TypeScript
npm i -S binconv
Here are avaiable converters.
Naming rule: A
→ B
should be aToB()
.
conversion | function |
---|---|
Base64 → Uint8Array | base64ToUint8Array() |
Blob → ArrayBuffer | blobToArrayBuffer() |
Blob → ReadableStream | blobToReadableStream() |
Blob → Uint8Array | blobToUint8Array() |
ReadableStream → Blob | readableStreamToBlob() |
ReadableStream → Uint8Array | readableStreamToUint8Array() |
string → Uint8Array | stringToUint8Array() |
string → ArrayBuffer | stringArrayBuffer() |
Uint8Array → ArrayBuffer | uint8ArrayToArrayBuffer() |
Uint8Array → Base64 | uint8ArrayToBase64() |
Uint8Array → Blob | uint8ArrayToBlob() |
Uint8Array → hex string | uint8ArrayToHexString() |
Uint8Array → ReadableStream | uint8ArrayToReadableStream() |
Uint8Array → string | uint8ArrayToString() |
import * as binconv from 'binconv';
const blob = new Blob(["this is a blob"]);
const readableStream = binconv.blobToReadableStream(blob);
You can import only specific conversion to reduce file size.
import {blobToReadableStream} from 'binconv/dist/src/blobToReadableStream';
const blob = new Blob(["this is a blob"]);
const readableStream = blobToReadableStream(blob);
[0.2.0] - 2020-02-02
Uint8Array
→ Base64Uint8Array
FAQs
Binary converters for Blob, Uint8Array, ReadableStream, ArrayBuffer, string in JavaScript/TypeScript
The npm package binconv receives a total of 75 weekly downloads. As such, binconv popularity was classified as not popular.
We found that binconv 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.