typed-array-buffer

1.0.3last stable release 4 months ago
Complexity Score
Low
Open Issues
1
Dependent Projects
276
Weekly Downloadsglobal
33,679,906

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Loading Weekly Download Data

Readme

typed-array-buffer

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.

Example

const typedArrayBuffer = require('typed-array-buffer');
const assert = require('assert');

const arr = new Uint8Array(0);
assert.equal(arr.buffer, typedArrayBuffer(arr));

Tests

Simply clone the repo, npm install, and run npm test

Dependencies

Loading dependencies...

CVE IssuesActive
0
Scorecards Score
5.40
Test Coverage
100.00%
Follows Semver
Yes
Github Stars
4
Dependenciestotal
23
DependenciesOutdated
2
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute typed-array-buffer in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install typed-array-buffer
Processing...
Done

4 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.