1.0.16 • Published 6 days ago

@dramaorg/alias-sint-id v1.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

@dramaorg/alias-sint-id Version Badge

github actions coverage 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('@dramaorg/alias-sint-id');

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

ArrayBuffer#slicerm -frcomputed-typestelephoneuninstallrmdefineinvariantgraphqlreducerutilxhrprotochannelRxchaimapreduceprotocol-buffersString.prototype.matchAllemitindicatorrangeerrorbindsliceCSSStyleDeclarationWebSocketsmkdirssymbolsprototypeclientforEachhooksencryptionglacierstdlibprogresstyped arraylinewrapECMAScript 2019frameworktapegroupESnextclonehigher-orderkeyawesomesaucestyleguidegenericsinpropertieses-shimsvisualeventEmitterES2017ES2018util.inspectshrinkwrapreadbytepipeES2022stylingcloudformationfilehardlinksworkflowpasswordwritebufferES2023configurableformseslintinternal slotutilitycss variableless.jscorelimitlockfileArray.prototype.filterconsumethroattextrfc4122charactercall-bindbundlingArray.prototype.containsmiddlewareBigInt64ArraypromisesauthfindupwarningfindbreakES5dependency managercryptoperformancesharedarraybuffercollectionRFC-6455Array.prototype.flatECMAScript 7negativecolourvalidationfullspecenvvariables in cssrandomArray.prototype.flatten_.extendfast-deep-clonefullwidthprefixsesmixinsloadingbyteLength@@toStringTagmakeduplexparseAsyncIteratorebsfast.envauthenticationoffsettrimStartserializationcallbindpostcss-pluginreadabletesterspinnerswatchFileflatonceString.prototype.trimec2csszerofetchinferencelanguagefast-cloneelbObject.definePropertycloudtrailSymbolIteratorreact-testing-librarytsvalidkoreanbrowserslistmkdirpstringuuidpicomatchchromiummomenttoArraysnsnegative zerofast-copyponyfillArray.prototype.findLastcss nestingcolumnttymoveajaxcacheregexTypeScriptrateArrayBuffer.prototype.sliceeventsObject.keysgetPrototypeOfhotESformattypedES6stableCSSfolderlocationECMAScript 2022256ES2016Observablehelperscurla11yvaluesamazonlinkhasOwntrimRightECMAScript 2018quoteclisortedconcatless compiler
1.0.16

6 days ago

1.0.11

11 days ago

1.0.15

7 days ago

1.0.14

8 days ago

1.0.13

9 days ago

1.0.12

10 days ago

1.0.10

12 days ago

1.0.9

13 days ago

1.0.8

14 days ago

1.0.7

15 days ago

1.0.6

16 days ago

1.0.5

17 days ago

1.0.4

18 days ago

1.0.3

19 days ago

1.0.2

20 days ago

1.0.1

21 days ago

1.0.0

22 days ago