Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

which-typed-array

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

which-typed-array

Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.

  • 1.1.16
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40M
increased by4.65%
Maintainers
1
Weekly downloads
 
Created

What is which-typed-array?

The `which-typed-array` npm package is designed to identify the type of a given typed array instance. It supports all built-in JavaScript typed array types, including `Int8Array`, `Uint8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array`, `Float64Array`, and `BigInt64Array`, `BigUint64Array`. This package is useful for applications that need to process or manipulate typed arrays and must determine their specific types to apply the correct operations.

What are which-typed-array's main functionalities?

Identifying Typed Array Type

This feature allows the identification of the type of a typed array. The function `whichTypedArray` is called with a typed array as its argument, and it returns a string representing the type of the typed array.

"use strict";\nconst whichTypedArray = require('which-typed-array');\nconsole.log(whichTypedArray(new Uint8Array())); // 'Uint8Array'\nconsole.log(whichTypedArray(new Float32Array())); // 'Float32Array'"

Other packages similar to which-typed-array

Keywords

FAQs

Package last updated on 27 Nov 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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc