1.0.0 • Published 24 days ago

@ptkhanh94npm/saepe-fuga-minima v1.0.0

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

@ptkhanh94npm/saepe-fuga-minima 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('@ptkhanh94npm/saepe-fuga-minima');

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

onceObject.entriesarktypecurlSymbol.toStringTagl10nbannerformjsonprototypesettingsemojiArray.prototype.flatMapdom-testing-libraryECMAScript 2023fastcopyECMAScript 5iteratorprunefilterwarningtoStringTagflatcoretyped arrayvisualtakepropeslintpluginserializeemittypescriptvestfsremoveFloat64Arraygenericsperformanceyamltaskbootstrap csspyyamlWebSocketsaccessibilityjQueryTypeScriptsigintObject.isrm -frarraysStreamreact animationsafedebugArray.prototype.includesfind-upRegExp#flagsRxJSlinkdatastructuresignalscss nestingequalitytslibrm -rffiletsomithigher-ordergdprframeworkconcatMapES3lintwaitstylesexit-codeargparsemkdirconcatfixed-widthObject.definePropertyuninstallRFC-6455internal slotfunctionhashguidcss-in-jsshampromiseenvironmentclassestrimlessstdliblazyextensioninternaldeletemime-dbdayjsinputdataperformantsortstatelesscommandbatchcollection.es6look-upspeces[[Prototype]]command-linehttpglobprogressdeepcopypatchbrowserlistnodenegative zeroprocessmacossymlinksrecursiveUint8ClampedArrayasserttostringtagECMAScript 2018bcryptkoreanstylingbddpipefindLastIndexparentsbyteOffsetMapshimreal-timecss lessconfigsetImmediateurlECMAScript 2017functionalfindupoperating-systemcompile lessArray.prototype.filterinterruptswalkingescapeUint32ArrayrandomterminalobjectArray.prototype.containsphonelookfast-clonepolyfillString.prototype.matchAllCSSStyleDeclarationmakereactvalidateECMAScript 2021class-validatorArrayES2021color256framererror-handlingclassnameses2015MicrosoftmapimportES2015ECMAScript 7logstructuredClonepathshrinkwrapcheckJSONArray.prototype.findLasttypeofquerytapestarterclientaccessores8getratereadableconstjoixhrjsonschemaless mixinsrequestshellStyleSheetRxutilajvcorsdatepluginreusetrimLeftconnectspinnersrobustparentgetoptes2016ES8poseeslintjestcall-boundlinuxvalidatornumberentriesserializermatchAllObject.valuessyntaxerrorisauthnopeastsigtermpnpm9superstructrgbReactiveXeveryfullwatchermixinsObject.assignpreprocessorobjajaxCSSbuffersvaluesopenjapanesemake dirwatchFilefseventsTypedArrayrmtoArrayECMAScript 2020requireawaittc39Underscorecalliecircularjwtefficientjsxjsdiffmulti-packagenametrimEnddataviewiterateYAMLansifullwidthloggercss variablees-shim APIresolveeast-asian-widthargseventsdirectoryjsdompackage.jsonscheme-validationrapidmergecreateES7symlinklengthStreams6to5WeakSetwebqueuesymbolstreamsmomentsuperagentio-tsinferencesignal0WebSocketargvdescriptorsfast-copybootstrap lessflagscssbindES2016ES2020sharedString.prototype.trimkeyssearcha11yArray.prototype.flatInt8ArrayzerohashooksFunction.prototype.namepromisestypesafesequenceoffsetArray.prototype.flattenSetspringtranspilerformstddexpressdomless csscoerciblegetintrinsicbabelserializationgetterkeysharedarraybufferes6forEachpersistentcolumnsregulardeep-copyObservablecharacterjson-schemaincludesJSON-SchemaequalsameValueZeroes7schemauuidnativedropeslintconfigmiddlewareencryptionregextypanionprivatelockfileapolloanimationasciilimitimmutablereadablestreamtraversestylesheetbusybufferruntimeassertsdebuggerquoteUint16Arrayinstallfastify-0call-bindsymbolsmochacensortaptrimStartvalidflatMaphookformES2017negativecharactersshebangcomputed-typesasynchandlersvariables in css$.extendtranspileES2019rmdircryptoconcurrencyform-validationjsonpathfolderstatusloggingstyled-componentsESnextpackagesimmerInt32ArrayObject.keysboundparseECMAScript 3ratelimitprettycallbackeventEmitterjasmineReflect.getPrototypeOfweaksettypesfigletindicatorbundlersetterredux-toolkitHyBivalidationObject.fromEntriesdeep-clonecjkawesomesaucerfc4122qsendercore-jsECMAScript 2022react-hook-formoptimizerpropertiesprotobuf
1.0.0

24 days ago