Kargi-Sitesi/node_modules/array-buffer-byte-length
2024-11-03 21:30:09 -05:00
..
.github Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
test Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
.eslintrc Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
.nycrc Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
CHANGELOG.md Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
index.d.ts Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
index.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
LICENSE Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
package.json Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
README.md Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
tsconfig.json Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00

array-buffer-byte-length Version Badge

github actions coverage License Downloads

npm badge

Get the byte length of an ArrayBuffer, even in engines without a .byteLength method.

Example

const assert = require('assert');
const byteLength = require('array-buffer-byte-length');

assert.equal(byteLength([]), NaN, 'an array is not an ArrayBuffer, yields NaN');

assert.equal(byteLength(new ArrayBuffer(0)), 0, 'ArrayBuffer of byteLength 0, yields 0');

Tests

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