Socket
Socket
Sign inDemoInstall

available-typed-arrays

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

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
27M
decreased by-14.42%
Maintainers
1
Install size
14.8 kB
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.5 - 2021-08-30

Fixed

  • [Refactor] use globalThis if available #12

Commits

  • [Dev Deps] update eslint, @ljharb/eslint-config, tape 1199790

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(), [
	'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

Last updated on 31 Aug 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc