Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 6, 2024 via pnpm

which-typed-array 1.1.9

Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
Package summary
Share
0
issues
1
license
20
MIT
Package created
5 Oct 2015
Version published
2 Nov 2022
Maintainers
1
Total deps
20
Direct deps
6
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
20 Packages, Including:
available-typed-arrays@1.0.7
call-bind@1.0.7
define-data-property@1.1.4
es-define-property@1.0.0
es-errors@1.3.0
for-each@0.3.3
function-bind@1.1.2
get-intrinsic@1.2.4
gopd@1.0.1
has-property-descriptors@1.0.2
has-proto@1.0.3
has-symbols@1.0.3
has-tostringtag@1.0.2
hasown@2.0.2
is-callable@1.2.7
is-typed-array@1.1.13
possible-typed-array-names@1.0.0
set-function-length@1.2.2
which-typed-array@1.1.15
which-typed-array@1.1.9
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

6
All Dependencies CSV
β“˜ This is a list of which-typed-array 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
available-typed-arrays1.0.719.9 kBMIT
prod
call-bind1.0.721.6 kBMIT
prod
for-each0.3.34.05 kBMIT
prod
gopd1.0.13.55 kBMIT
prod
has-tostringtag1.0.26.31 kBMIT
prod
is-typed-array1.1.137.79 kBMIT
prod

Visualizations

Frequently Asked Questions

What does which-typed-array do?

The which-typed-array is a powerful JavaScript npm package utilized for determining the kind of Typed Array of a JavaScript value. It serves an essential purpose in revealing the specific Typed Array type, implementing this functionality across different realms, despite Symbol.toStringTag, and without using instanceof. This package ensures compatibility and interaction across different arrays while circumventing any potential issues related to array identification.

How do you use which-typed-array?

To use the which-typed-array package, you first need to install it, which is easily done via npm. The following instructions illustrate its use:

  1. First, install the package by running the command npm install which-typed-array
  2. Then, in your JavaScript file, require the which-typed-array module.

Here's a simple code example illustrating its application:

var whichTypedArray = require('which-typed-array');
var assert = require('assert');

assert.equal('Int8Array', whichTypedArray(new Int8Array()));
assert.equal('Uint8Array', whichTypedArray(new Uint8Array()));
// And so on for the various typed arrays

In the code snippet above, whichTypedArray function is used to check the type of various typed arrays. If the input value is a type of Typed Array, the function will return a string representing the constructor name; otherwise, it will return false.

Where are the which-typed-array docs?

As for the which-typed-array documentation, it can be found primarily in the README file on its GitHub repository. Here, you'll find comprehensive details about what the package accomplishes, how to use it and run tests on it. The readme is very thorough, providing detailed examples of the npm package in action. Thus, it serves as a great starting point in understanding the functions and manipulating the Typed Array types.