Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

is-array-buffer

Package Overview
Dependencies
3
Maintainers
2
Versions
7
Issues
File Explorer

Advanced tools

is-array-buffer

Is this value a JS ArrayBuffer?

    3.0.1latest
    Github

Version published
Maintainers
2
Weekly downloads
9,132,868
increased by17.23%

Weekly downloads

Changelog

Source

v3.0.1 - 2023-01-05

Commits

Readme

Source

is-array-buffer Version Badge

github actions coverage License Downloads

npm badge

Is this value a JS ArrayBuffer? This module works cross-realm/iframe, does not depend on instanceof or mutable properties, and despite ES6 Symbol.toStringTag.

Example

var assert = require('assert'); var isArrayBuffer = require('is-array-buffer'); assert(!isArrayBuffer(function () {})); assert(!isArrayBuffer(null)); assert(!isArrayBuffer(function* () { yield 42; return Infinity; }); assert(!isArrayBuffer(Symbol('foo'))); assert(!isArrayBuffer(1n)); assert(!isArrayBuffer(Object(1n))); assert(!isArrayBuffer(new Set())); assert(!isArrayBuffer(new WeakSet())); assert(!isArrayBuffer(new Map())); assert(!isArrayBuffer(new WeakMap())); assert(!isArrayBuffer(new WeakRef({}))); assert(!isArrayBuffer(new FinalizationRegistry(() => {}))); assert(!isArrayBuffer(new SharedArrayBuffer())); assert(isArrayBuffer(new ArrayBuffer())); class MyArrayBuffer extends ArrayBuffer {} assert(isArrayBuffer(new MyArrayBuffer()));

Tests

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

Keywords

FAQs

What is is-array-buffer?

Is this value a JS ArrayBuffer?

Is is-array-buffer popular?

The npm package is-array-buffer receives a total of 8,600,484 weekly downloads. As such, is-array-buffer popularity was classified as popular.

Is is-array-buffer well maintained?

We found that is-array-buffer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 2 open source maintainers collaborating on the project.

Last updated on 05 Jan 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc