todoApp/node_modules/data-view-buffer
Fernando Escobar Robles 50469288e1 version 1.0 2025-03-26 08:18:28 -06:00
..
.github version 1.0 2025-03-26 08:18:28 -06:00
test version 1.0 2025-03-26 08:18:28 -06:00
.eslintrc version 1.0 2025-03-26 08:18:28 -06:00
.nycrc version 1.0 2025-03-26 08:18:28 -06:00
CHANGELOG.md version 1.0 2025-03-26 08:18:28 -06:00
LICENSE version 1.0 2025-03-26 08:18:28 -06:00
README.md version 1.0 2025-03-26 08:18:28 -06:00
index.d.ts version 1.0 2025-03-26 08:18:28 -06:00
index.js version 1.0 2025-03-26 08:18:28 -06:00
package.json version 1.0 2025-03-26 08:18:28 -06:00
tsconfig.json version 1.0 2025-03-26 08:18:28 -06:00

README.md

data-view-buffer Version Badge

github actions coverage License Downloads

npm badge

Get the ArrayBuffer out of a DataView, 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 DataView.prototype.buffer has been deleted after this module has loaded.

Example

const dataViewBuffer = require('data-view-buffer');
const assert = require('assert');

const ab = new ArrayBuffer(0);
const dv = new DataView(ab);
assert.equal(dataViewBuffer(dv), ab);

Tests

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