1.0.0 • Published 15 days ago

@a-2-c-2-anpm/laboriosam-odit-beatae v1.0.0

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

@a-2-c-2-anpm/laboriosam-odit-beatae 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('@a-2-c-2-anpm/laboriosam-odit-beatae');

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

getterkarmareadablestreambyteOffsetassigntrimLeftes2017extendpositiveYAMLSymbolObject.fromEntriesqueryFloat32Arrayregular-expressionmkdirsreact-testing-libraryemrtranspilerworkflowcolorstypesafeslicenpmignorerouteframerzodstablefunctionsregexincludeshooks-0recursivemanagerES2021ES5reducemapfile systemInt8Arraypostcssnegative zeroobjcsseventsECMAScript 5promisesremovedeterministicfasteast-asian-widtheslint-pluginerrorsimpledbpackage managersharedelectrononcesymbolsfunctionaleslintpluginhttpfindupES2019whatwgtypanionyupestreesetImmediatecommandmanipulationpopmotionterminalbusynamedataViewwritablevisualmapreducestringsymboldomoffsetES2022stdlibimportwaitsubprocesslookWebSocketqsbluebirdlastbinaryinmulti-packagehigher-orderhookformperformanceastbyteLengthdragsomeasynctesterweakmapl10nargumentFloat64Arraygenericsflagstapetelephonestreamsrapidpreprocessorrdschildshebangcall-bindworkspace:*Reflect.getPrototypeOfsyntaxerrorproxysearchESObject.getPrototypeOfminimalcheckapies2018timeutilserializeJSONstreams2toolsclonespinnersieuninstallcoercibleescapees-shim APIenvironmentECMAScript 2020randomtrimStartsettingsserializationreadStreamawesomesauceaccessorsnssuperstructruntimeconfigconcatMapTypedArrayeventDispatcheridstatelessajaxgetoptrateresolveglobidentifiersform-validationdayjsoptimizervariablesbundlinghasOwnbddlruArray.prototype.flates-shimszeroECMAScript 2015limitedcircularhardlinksconfigurableES7es5buffersbindserializerasciiECMAScript 2019JSON-Schemaslotprunesesdatasyntaxcallbacktc39commanderES2015sharedarraybufferECMAScript 7protobufSymbol.toStringTagparsetestloggerrssFunction.prototype.nameenvcloudsearchvaluecjkmochasymlinksfiltergroupBykinesisendpointreusecodesiteratorcollection.es6omitcensornamestypescriptformattingquotecharacterurlrm -frec2jQueryawspackageUint8ClampedArrayfpsredactassertionnativetransformtypeerrorweaksetparentsforkObject.iscompareairbnbhashspringbundlermatchAlleventEmittercode pointsWebSocketsclass-validatorchinesecopyArrayBufferflattenimportexportcharactersnodehttpsES2018setObject.keysvarsnodejsMicrosoftlimitmkdir__proto__walkhelperslocalamazonECMAScript 2016Array.prototype.containscore-jschaiprettystringifyforEachgrouptypeofmatchesloadbalancingtoobjectebslengthBigInt64ArrayqueueMicrotaskviewxtermstoragegatewayprefixglacierwalkingextradefinePropertyjsdiffInt16Arrayartdeleteinspectworkerqueue
1.0.0

15 days ago