Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

data-view-buffer

inspect-js68.9mMIT1.0.2TypeScript support: included

Get the ArrayBuffer out of a DataView, robustly.

javascript, ecmascript, dataview, buffer, robust

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.2 - 2024-12-19

Commits

  • [actions] split out node 10-20, and 20+ f99dc3f
  • [types] use shared tsconfig 9ad8630
  • [readme] update URLs d3c66fb
  • [Dev Deps] update @ljharb/eslint-config, @ljharb/tsconfig, @types/object-inspect, @types/tape, auto-changelog, es-value-fixtures, object-inspect, tape 7dda732
  • [Refactor] use call-bound directly 5e124f9
  • [Deps] update call-bind, is-data-view 73fb1a4
  • [Tests] replace aud with npm audit 64563a3
  • [Dev Deps] update @ljharb/tsconfig b842ce8
  • [Deps] update call-bind bc89873
  • [Dev Deps] update tape b6ed8cb
  • [Dev Deps] add missing peer dep ba96a94

v1.0.1 - 2024-02-06

Commits

  • [Refactor] use es-errors, so things that only need those do not need get-intrinsic 675f588
  • [Deps] update call-bind, get-intrinsic e6eb209

v1.0.0 - 2024-02-02

Commits