codeql-action/node_modules/typed-array-buffer
2024-09-16 17:29:58 +00:00
..
.github Bump the npm group with 2 updates (#1819) 2023-08-01 03:35:02 -07:00
test Update checked-in dependencies 2024-09-16 17:29:58 +00:00
.eslintrc Bump the npm group with 2 updates (#1819) 2023-08-01 03:35:02 -07:00
.nycrc Bump the npm group with 2 updates (#1819) 2023-08-01 03:35:02 -07:00
CHANGELOG.md Update checked-in dependencies 2024-09-16 17:29:58 +00:00
index.d.ts Update checked-in dependencies 2024-09-16 17:29:58 +00:00
index.js Update checked-in dependencies 2024-09-16 17:29:58 +00:00
LICENSE Bump the npm group with 2 updates (#1819) 2023-08-01 03:35:02 -07:00
package.json Update checked-in dependencies 2024-09-16 17:29:58 +00:00
README.md Bump the npm group with 2 updates (#1819) 2023-08-01 03:35:02 -07:00
tsconfig.json Update checked-in dependencies 2024-09-16 17:29:58 +00:00

typed-array-buffer Version Badge

github actions coverage License Downloads

npm badge

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