package
Get the ArrayBuffer out of a TypedArray, robustly.
npm install typed-array-bufferGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Get the ArrayBuffer out of a TypedArray, robustly.
This will work in node <= 0.10 and < 0.11.4, where there's no prototype accessor, only a nonconfigurable own property.
It will also work in modern engines where TypedArray.prototype.buffer has been deleted after this module has loaded.
const typedArrayBuffer = require('typed-array-buffer');
const assert = require('assert');
const arr = new Uint8Array(0);
assert.equal(arr.buffer, typedArrayBuffer(arr));Simply clone the repo, npm install, and run npm test
Estimated unpacked size across 18 packages.
365.5 kB
Includes dependencies.
3 direct dependencies.