
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
is-shared-array-buffer
Advanced tools
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.
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()));
Simply clone the repo, npm install
, and run npm test
v1.0.3 - 2024-02-20
npmignore
to autogenerate an npmignore file c4131f5
41cb419
2655b01
@ljharb/eslint-config
, aud
, available-typed-arrays
, npmignore
, object-inspect
, tape
5917f9a
823dd7a
eslint
, @ljharb/eslint-config
, aud
, es-value-fixtures
, object-inspect
, tape
6701ad4
b5119f0
@ljharb/eslint-config
, aud
38a6d72
engines.node
aac97e1
07c452d
call-bind
b8576fe
sideEffects
flag 3e6730e
FAQs
Did you know?
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.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.