You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

available-typed-arrays

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

available-typed-arrays

Returns an array of Typed Array names that are available in the current environment


Version published
Weekly downloads
34M
increased by0.4%
Maintainers
1
Created
Weekly downloads
 

Package description

What is available-typed-arrays?

The available-typed-arrays npm package provides a simple way to list all available typed array constructors in the current environment. This can be particularly useful for applications that need to work with binary data in a way that is compatible across different platforms and JavaScript environments. It helps in identifying which typed arrays are supported, allowing developers to write more adaptable and robust code.

What are available-typed-arrays's main functionalities?

Listing available typed arrays

This feature allows you to retrieve an array of strings representing the names of all available typed array constructors. The code sample demonstrates how to use the package to get the list of available typed arrays and then log them to the console.

const availableTypedArrays = require('available-typed-arrays');
const typedArrays = availableTypedArrays();
console.log(typedArrays);

Other packages similar to available-typed-arrays

Changelog

Source

v1.0.7 - 2024-02-19

Commits

  • [Refactor] use possible-typed-array-names ac86abf

Readme

Source

available-typed-arrays Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Returns an array of Typed Array names that are available in the current environment.

Example

var availableTypedArrays = require('available-typed-arrays');
var assert = require('assert');

assert.deepStrictEqual(
	availableTypedArrays().sort(),
	[
		'Int8Array',
		'Uint8Array',
		'Uint8ClampedArray',
		'Int16Array',
		'Uint16Array',
		'Int32Array',
		'Uint32Array',
		'Float32Array',
		'Float64Array',
		'BigInt64Array',
		'BigUint64Array'
	].sort()
);

Tests

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

Keywords

FAQs

Package last updated on 19 Feb 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc