is-typed-array
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
available-typed-arrays | 1.0.7 | 19.9 kB | MIT | prod | |
call-bind | 1.0.7 | 21.6 kB | MIT | prod | |
for-each | 0.3.3 | 4.05 kB | MIT | prod | |
gopd | 1.0.1 | 3.55 kB | MIT | prod | |
has-tostringtag | 1.0.2 | 6.31 kB | MIT | prod |
"Is-typed-array" is an npm package that checks whether a given value is a JavaScript Typed Array. It operates across realms/iframes and is independent of instanceof
checks, mutable properties, and the ES6 Symbol.toStringTag.
To use "is-typed-array" in your JavaScript project, install the package in your working environment and require it in your code. You can then use the function isTypedArray()
to check whether a variable is a Typed Array. Here is an example usage.
For instance, initialize the function:
var isTypedArray = require('is-typed-array');
Then utilize it through the following assertions:
assert.ok(isTypedArray(new Int8Array())); // returns true
assert.equal(false, isTypedArray('foo')); // returns false
"Is-typed-array" will return true for any value that is a Typed Array and false for anything that is not.
For "is-typed-array's" documentation, you can refer to the package's GitHub page and its npm page. These pages contain all the necessary information about this package, including its basic function, examples of its usage and the tests connected with this package.