Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

is-shared-array-buffer

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

is-shared-array-buffer

Is this value a JS SharedArrayBuffer?

    1.0.2latest

Version published
Maintainers
1
Weekly downloads
20,434,780
decreased by-12.98%

Weekly downloads

Changelog

Source

v1.0.2 - 2022-04-01

Commits

Readme

Source

is-shared-array-buffer Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS SharedArrayBuffer? 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 isSharedArrayBuffer = require('is-shared-array-buffer'); assert(!isSharedArrayBuffer(function () {})); assert(!isSharedArrayBuffer(null)); assert(!isSharedArrayBuffer(function* () { yield 42; return Infinity; }); assert(!isSharedArrayBuffer(Symbol('foo'))); assert(!isSharedArrayBuffer(1n)); assert(!isSharedArrayBuffer(Object(1n))); assert(!isSharedArrayBuffer(new Set())); assert(!isSharedArrayBuffer(new WeakSet())); assert(!isSharedArrayBuffer(new Map())); assert(!isSharedArrayBuffer(new WeakMap())); assert(!isSharedArrayBuffer(new WeakRef({}))); assert(!isSharedArrayBuffer(new FinalizationRegistry(() => {}))); assert(!isSharedArrayBuffer(new ArrayBuffer())); assert(isSharedArrayBuffer(new SharedArrayBuffer())); class MySharedArrayBuffer extends SharedArrayBuffer {} assert(isSharedArrayBuffer(new MySharedArrayBuffer()));

Tests

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

Keywords

FAQs

What is is-shared-array-buffer?

Is this value a JS SharedArrayBuffer?

Is is-shared-array-buffer popular?

The npm package is-shared-array-buffer receives a total of 16,331,301 weekly downloads. As such, is-shared-array-buffer popularity was classified as popular.

Is is-shared-array-buffer well maintained?

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

Last updated on 02 Apr 2022

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

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc