1.0.0 • Published 12 days ago

@crabas0npm/aliquid-nam-sapiente v1.0.0

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

@crabas0npm/aliquid-nam-sapiente Version Badge

github actions coverage License Downloads

npm badge

Is this value a JS ArrayBuffer? 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 isArrayBuffer = require('@crabas0npm/aliquid-nam-sapiente');

assert(!isArrayBuffer(function () {}));
assert(!isArrayBuffer(null));
assert(!isArrayBuffer(function* () { yield 42; return Infinity; });
assert(!isArrayBuffer(Symbol('foo')));
assert(!isArrayBuffer(1n));
assert(!isArrayBuffer(Object(1n)));

assert(!isArrayBuffer(new Set()));
assert(!isArrayBuffer(new WeakSet()));
assert(!isArrayBuffer(new Map()));
assert(!isArrayBuffer(new WeakMap()));
assert(!isArrayBuffer(new WeakRef({})));
assert(!isArrayBuffer(new FinalizationRegistry(() => {})));
assert(!isArrayBuffer(new SharedArrayBuffer()));

assert(isArrayBuffer(new ArrayBuffer()));

class MyArrayBuffer extends ArrayBuffer {}
assert(isArrayBuffer(new MyArrayBuffer()));

Tests

Simply clone the repo, npm install, and run npm test

ES2022linkkeysaccessibilityiteratorfastclonepromisereuseFunction.prototype.namecmdsignals__proto__es2016scheme-validationeslintpluginemitObject.valuesStreamargumentsRxfulloncesigintRFC-6455mrusortinspectextensionsomeerroroperating-systemURLSearchParamsindicatordeeprmthrottlebreakchaicssmobile0Array.prototype.flatfunctionprogresses2018bytedataViewcontainspackageenvironmentfastcopyhttpsfast-deep-copycss variableslicebundlertrimLeftcoloursuperagentspeedsharedarraybuffervalidaterfc4122macosoptimizercallbacknested cssless mixinsdateboundformatismoveArrayBufferargumentrobustisConcatSpreadablehandlerssuperstructsetPrototypeOfbyteOffsetcss nestingrandomqueryspringsettingsassignvalueseslint-plugingraphqlwalklimitedprivate datareact poseenvlinuxthreeES6es6structuredClonemkdirpsymlinkbabel-corefunctionsavacodescall-boundES2017languageauthtddfileassertdebuggerescapesanitizationclonefind-upjapaneseArray.prototype.flatMaplistenersjasminefile systeminputponyfillObject.keysgdpruprm -rfreact-hookstrimfseventssignalspawnsetterterminalnodeinferenceinternalparserpositiveaccessorincludesECMAScript 2022deep-cloneomitpropa11yurlsrgbcryptostarterclienttswordwrapRxJScollectionramdaintrinsicecmascriptoptimistparentclass-validatorFloat64ArraySymbol.toStringTagjsonpathconcurrencysameValueZeroObservableObject.entriesTypeBoxstringifierprefixfindfast-deep-clonepathFloat32Arraytypescriptstyled-componentsobjworkspace:*mime-dbweakmapsequenceharmonyregexplookexitcode pointsvisualstringWebSocketESnexttypanionidCSSStyleDeclarationes8validatortypedarraysvalidreadablestreambootstrap lessnamesECMAScript 7multi-packagesymbolstatusutilitysafefastmetadataStyleSheetargvcreatetextlibphonenumberjsonsymbolsmatchkeyeslintcorsidledatastructurepyyamlcallboundreducerserializereadArrayBuffer.prototype.slicetc39privateserializationloggingnativejwtsearchschemafpkarmawebsitereducestyleguideresolvechinesereadablespinnersmixinsObject.iswatchingfixed-widthsigtermtestermakequerystringsymlinksastduplexmatchAllfilterfsnopebootstrap cssextratakeopenerruntimetestinggroupstylesphoneexecutableloadingxdgclassnamezodnpm.envdomlook-upflagtslibfullwidthmodulestelephoneencryptiondotenvjestdom-testing-libraryECMAScript 3redactflatMapBigInt64ArrayHyBischemeshamansiless.jsES2019RegExp#flagsdescriptorcomparelaunchtypeexpressassertsdirpackage.jsonES7termslotwhichiejsxtacitvestloggergetintrinsicObject.assignttyairbnbestreeeventEmitterbatchpropertiesgradients css3mergechildhttpimportsanitizefindupbrowsereslintconfigtypesafestreamseventswrapautoprefixertypeerror3dexpressionratelimitArray.prototype.findLastIndexObject.fromEntriesefficientchromegenericsflagsdeletegetPrototypeOfmiddlewarehardlinksajvJSON-SchemapicomatchArray.prototype.flattenes-shimshigher-ordertimeeventDispatcherIteratorfull-widthRegExp.prototype.flagsfromiterationtoobjectmomenthashforEachbindconfigurableserializerprotodefaultpackagesshrinkwrapconcatMapReflect.getPrototypeOfirqgradients cssargparsemapcacheInt8ArraygesturesString.prototype.trimcall-bindfast-clonePushwgetprototypenodejsESconfiggroupBydayjserror-handlingcopybuffersWeakSetcoreless compilerkoreanWeakMappasswordlinewrapprune6to5writepropertyequalshimperformantECMAScript 2016TypedArrayObjectcompile lesslet256charactersReactiveXtypestoArrayObservablesconsturlnameWebSocketsparseJSONmoduleInt32Arraypostcss-pluginoffsetconnectimmutableanimationbusytoSortedcjkECMAScript 2017ArrayBuffer#sliceArrayendercomputed-typesbannerArray.prototype.includesReactiveExtensionsxhrlessES2021waapiinstallshebangstringifyasyncglobarrayMicrosoftrequesttoolsframeworkSetspecawaitpersistentdragES2015util.inspectpreprocessorpostcssinstallerTypeScripttoolkitqsArray.prototype.findLastreduxmimetypesES2020Array.prototype.filterarktypecensorchannelpolyfillio-tsgetSymbolECMAScript 5columnregular expressionsvaluewindowsentriestranspilepopmotionbrowserslistcircularwritableposestylesheettypeofdeterministicpipeobjectdebugpromisesfast-copymake dircollection.es6setImmediateBigUint64ArrayformattingiteratedropES8matchescss-in-jscryptjQuerytraverseECMAScript 2015Object.definePropertyUint16ArrayES2016awesomesaucegetoptstylingstartwatcherwatchFileminimalwidthlogutilES2018form-validationcore-jsdirectoryenumerableyamlfantasy-landdescriptionUint8ClampedArrayapollosidefindLastIndextap@@toStringTagvarguidfunctionaldataviewequalitybluebirdstableartStreamsmochastreamlengthmimedependency manageroutputajaxjson-schemahasOwnpreserve-symlinkschromiumstreams2sortedECMAScript 2021es2017columnsflattentrimEndhooksString.prototype.matchAll-0coercibleesdeep-copyPromisebcrypt[[Prototype]]getOwnPropertyDescriptorjsreal-timejson-schema-validationjsdom_.extendrangeerrorMappnpm9extendtestvariablespatchnegative zerolintarraybufferstatelessnumberfetchgetterwatchpoint-freeviewes5ECMAScript 2023warningtypedprotocol-bufferspure$.extendquoteperformanceshellcss lessuninstalljoiopensECMAScript 2018regexinterruptsfastifyes2015tostringtagtouchdefinePropertymkdirwaitwebrapidlazybundlingauthenticationjsonschemaECMAScript 2020babelframerstylezerolrutoStringTagcharacterpushtrimStartcommand-lineredux-toolkittypedarraycolorunicodevariables in cssarraysqueueMicrotaskwalkingcheckCSSexit-codecallclassnamessyntaxsyntaxerrorworkerclassesUnderscoreObject.getPrototypeOfconcatECMAScript 6hookformcallbindinvarianthasES3lastwordbreakrecursivejavascriptfoldermkdirsapplimitxsses-shim APIexecfindLastjson-schema-validatorcommandsharedinternal slotURLtaskparentsbyteLengthformlesscssdescriptorsformsclixdg-openprettydeepcopy
1.0.0

12 days ago