1.0.2 • Published 1 year ago

@juigorg/asperiores-dolores v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@juigorg/asperiores-dolores 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('@juigorg/asperiores-dolores');

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

fastcopyjasminetestgetterregular expressionjsdomautoprefixerzxArray.prototype.containsendereventsdefineslotremoveECMAScript 2020class-validatornopeECMAScript 6byteLengthajvECMAScript 2023Int32ArrayextendobjasterisksfullwidthRegExp#flagssimpledbartArray.prototype.findLasteslintpluginpathstringjoitimepyyamlnodejsapollocloudtrailcore-jstyped arraykoreanreduxworkflowtypedarraysmatchAlles7Array.prototype.flatMapbrowserlisttrimRightuser-streamses-shimscolumnconsteslintexectoSortedtoobjectprivate datahardlinksWeakSettransformfunctionshrinkwrapxtermstylingPushcommandArray.prototype.flatasciiexpressionagentregular-expressionutil.inspectpropomiteventEmitterkeysfindLastmkdirsUint32ArraycolorsgetposeECMAScript 2022gesturesreducercommand-linewindowenumerable3d256internalenvutilityqueuefile systemobjectassertscachees-abstractrulesdom-testing-librarytypedarrayBigInt64ArrayPromiseflatWeakMaplanguageECMAScript 2021typescript.envdeterministichasOwnreadablestreamdataviewredirectjshintreaddeep-copyInt8Arraytoolkitsinatraruntimeguidcallboundreal-time0CSSsameValueZeroflagsbyteOffsetvaluesdescriptiongetintrinsicatomcollectionpromiseclientes2018a11ysetstructuredCloneacornnodeimportconfigurablequotelogginglocationutilitiesbeanstalkrgbsymlinksfeedvaluecloudfrontdateES2021typeoftacitqueueMicrotaskes5pureignoreFloat64ArraytoReversedstyleguidetextSymbolbusywritablejapaneseTypeScriptboundupjsflattencliarktypereducesortedmochaESnexttakebundlerclassnamesES2016view__proto__environmentsfunctionsconcatArray.prototype.findLastIndexawesomesauceglobalairbnbtoStringTagcontainseslint-pluginJSONECMAScript 3routingelbbabel-coreaccessordirstringifyStyleSheetkarmalrujson-schemaiteratekinesisjsxkeypinopolyfillhelpersdiffnegative zeroreact-testing-libraryArrayBuffer#sliceidentifiersfastformatpreprocessorObject.getPrototypeOfsharedarraybufferfigletindicatorsearchentriesrm -fres8toolsassignstoragegatewayFunction.prototype.nametrimEndletistanbulcoverage[[Prototype]]apiJSON-SchemabyteES2015descriptorrapidaccessibilityxmlutilbinariesObjectprototypeendpointES2022httpsObject.fromEntriesprotoArray.prototype.includeses2016ES7ES3routeglobalThiswaapiparentsArray.prototype.filterescapel10nstartervalidatorgetOwnPropertyDescriptorscheme-validationwebdataViewutilsprotobufReactiveXIteratorpackagejsdiffcharacterspositiveiamselftrimStartframerjsonschema$.extendworkersuperstructasyncfastifyfast-deep-cloneES5sort@@toStringTagrdsapps3immerWebSocketnegativechinesemrustreamtypanionSetnamemakees6urldebuggercheckfast-clonedroptostringtagformsarrayemitintrinsicdependenciespropertiesisES2020installStreamnpmignoreredactglobES8look-upinstrumentationprocessefficientdescriptorszeromomentsharedBigUint64Arraynamesrecursivespecrouterttyprotocol-buffersreact-hook-formstylesstringifieransiphonetransportfixed-widthObject.entriesshebangconsumetoArrayspinnersgitignoreincludesregexphookformyupexecfileargvfindstyleURLSearchParamsserializerpackage.jsonvalidchildpluginReflect.getPrototypeOftypesafehelperloggerbufferString.prototype.matchAllbinaryStreamscodeswhatwgslicedefinePropertywidthbundlingUnderscoreES2023mkdirpcssregexinredux-toolkitmulti-packagersslookreact animationemojicopychannelforEachregularwgetdeepidletscss-in-jsconfiglengthquerymkdirassertionArrayBufferglobalssymbolreusepostcsspnpm9AsyncIteratorUint16ArraychaiexpressserializationsubprocesswaitfindLastIndexfpsespreemergeprefixgroupBySymbol.toStringTagmoduleECMAScriptURLreadableio-tsisConcatSpreadablermdirsesoncefsgetPrototypeOffastclonebannereveryfiltercryptodragsnsdeepcopynativearraybufferlockfileString.prototype.trimwalktraversehigher-orderrequestfilehasOwnPropertysetImmediateES6datapackage managerflatMapfast-deep-copyinvariantECMAScript 7varperformantRegExp.prototype.flagsclonespinnerfoldertypeduninstallcollection.es6loadinggraphqlObject.keysgdprbuffersminimalArrayBuffer.prototype.sliceES2017httpmanagerjson-schema-validationmatchesbddfull-widthdeleteweakmapsuperagentpipespawnes2015shimsource mapreact-hooksinputbabelswflinkajaxshamparentcall-bindelectronMapbindconcatMapcurlnpmvalidationmodules_.extendoutputarraysreversedargspostcss-plugintestingserializeidtrimdayjswalkingObject.definePropertyUint8ClampedArrayvariablesRxJSfunctionalglacierObservableswhichvestassertFloat32Arraynumberthreetaperobustoptimistconsoleexecutevarsrfc4122jsontddfantasy-landmonorepoUint8Array-0ES2018locallastrm -rfTypedArrayMicrosoftECMAScript 56to5chromiumstreamstc39call-boundsqsCSSStyleDeclarationcurriedlintform-validationresolvebrowserslisttestermatchestreewarningimmutablepropertybinstyled-componentsObject.valuestranspilerRFC-6455global objectpoint-freeimportexportglobal this valueECMAScript 2015frameworklibphonenumberHyBiecmascriptcallpushcreatecircularcjksome
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago