![Node.js Adds Experimental Support for TypeScript](https://cdn.sanity.io/images/cgdhsj6q/production/5fa307ef6135347f38e009b4da8cebcb3b9a386a-1948x1336.png?w=400&fit=max&auto=format)
Security News
Node.js Adds Experimental Support for TypeScript
Node.js has added experimental support for TypeScript, a move that highlights the growing importance of TypeScript in modern development.
array-buffer-byte-length
Advanced tools
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
Changelog
Readme
Get the byte length of an ArrayBuffer, even in engines without a .byteLength
method.
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');
Simply clone the repo, npm install
, and run npm test
FAQs
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
The npm package array-buffer-byte-length receives a total of 16,297,346 weekly downloads. As such, array-buffer-byte-length popularity was classified as popular.
We found that array-buffer-byte-length demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Node.js has added experimental support for TypeScript, a move that highlights the growing importance of TypeScript in modern development.
Product
Check out what's new at Socket with our Product Changelog. It tracks all public-facing updates, improvements, and fixes so you can take full advantage of our features.
Security News
In the latest Risky Biz Podcast episode, Socket CEO Feross Aboukhadijeh discussed the limitations of the National Vulnerability Database (NVD) in addressing the modern risks associated with using open source package registries.