Buckets:
32.1 GB
673,093 files
Updated 5 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| test | 1 items | ||
| .github | 1 items | ||
| tsconfig.json | 125 Bytes xet | 4aad8feb | |
| package.json | 2.53 kB xet | 60e4c7ec | |
| index.js | 412 Bytes xet | 1ab4b5e9 | |
| index.d.ts | 171 Bytes xet | b421ae8b | |
| README.md | 1.98 kB xet | b1e9d154 | |
| LICENSE | 1.07 kB xet | d7d7c42f | |
| CHANGELOG.md | 3.99 kB xet | fbc22858 | |
| .nycrc | 216 Bytes xet | 4448e85a | |
| .eslintrc | 83 Bytes xet | 4ce33bb1 |
array-buffer-byte-length
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
- Total size
- 32.1 GB
- Files
- 673,093
- Last updated
- Mar 19
- Pre-warmed CDN
- US EU US EU
