sta
string-to-arraybuffer
npm i string-to-arraybuffer
sta

string-to-arraybuffer

Convert plain/base64/datauri string to ArrayBuffer

by Dmitry Iv.

1.0.2 (see all)License:MITTypeScript:Not Found
npm i string-to-arraybuffer
Readme

string-to-arraybuffer unstable Build Status

Turn dataURI/base64/plain string into an ArrayBuffer.

npm install string-to-arraybuffer

var str2ab = require('string-to-arraybuffer')

// Plain 'Hello World!'
var abuf1 = str2ab('Hello World!')

// Base-64 'Hello World!'
var abuf2 = str2ab('SGVsbG8sIFdvcmxkIQ%3D%3D')

// Barebones data-uri 'Hello World!'
var abuf3 = str2ab('data:,Hello%2C%20World!')

// Base-64 data-uri 'Hello World!'
var abuf4 = str2ab('data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D')

Downloads/wk

147K

GitHub Stars

10

LAST COMMIT

4yrs ago

MAINTAINERS

2

CONTRIBUTORS

0

OPEN ISSUES

2

OPEN PRs

0
VersionTagPublished
1.0.2
latest
4yrs ago
No alternatives found
No tutorials found
Add a tutorial