@teasource/nihil-molestiae-necessitatibus
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@teasource/nihil-molestiae-necessitatibus Version Badge

github actions coverage License Downloads

npm badge

Get the byteLength 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.byteLength has been deleted after this module has loaded.

Example

const dataViewByteLength = require('@teasource/nihil-molestiae-necessitatibus');
const assert = require('assert');

const ab = new ArrayBuffer(42);
const dv = new DataView(ab);
assert.equal(dataViewByteLength(dv), 42);

Tests

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

Package Sidebar

Install

npm i @teasource/nihil-molestiae-necessitatibus

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.76 MB

Total Files

15

Last publish

Collaborators

  • shivamkalsi2024