1.0.0 • Published 1 year ago

@crabas0npm/fuga-temporibus-sit v1.0.0

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

@crabas0npm/fuga-temporibus-sit 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/fuga-temporibus-sit');

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

keysArrayBuffer.prototype.sliceformattingbreak-0intrinsicassertionprogresscurldependenciespushsharedarraybufferregexpextrasidesimpledbfilterlistenersjavascripta11yyuprecursivehelpersreplaytrimEndinputArray.prototype.flatMapiteratorwalkreal-timeiteratedebuggerenumerabletraverseworkspace:*colourInt32Arrayhotsetwatchfast-deep-cloneform-validationreact-testing-librarymiddlewarerm -rfnopereduxkinesisoutputefficientwindowsPromiseinstalllazychromewritetouchprototypeObjectRxJSxhrdefineoptimistnativetypedarraysdirectorycompile lessquerystringjsonpathECMAScript 2020rdslintawaitwhatwgapiarktypecommandertextfunctionsES2019Mapcloneinferencemimetypesl10nString.prototype.matchAllscheme-validationredux-toolkitlaststyled-componentsendpointapolloinstallertrimRightmacosiechromiumworkerECMAScript 2016namesstringclipackages3collectionpostcssawsrfc4122connectglobrgbownhookstimeWebSocketvaluefastcloneRxstoragegatewayauthnumberobjectcharactersInt8ArrayfindLastcjkreact-hooksstringifytypaniontypedarraynodejswordwrapcloudtrailtelephoneargsstructuredClonesyntaxspinnerUint32ArraytoolsArray.prototype.filterawesomesaucesymlinksbddcore-jssettingsfullwidthReactiveExtensionseventEmitterdeepcopyconsoletypescriptruntimeconsumeESBigUint64Arrayvalidatepreserve-symlinksshrinkwraptc39qsquoteestreeHyBilimitES2021Object.fromEntriesTypeScriptclassnameArray.prototype.findLastObject.entriesautoprefixerTypeBoxfindLastIndexreactreadcontainsjQueryvalidextendbundlingmergeweakmapArrayBuffernamees2018isConcatSpreadabledatestringifieroptionlook-upurlclassnamesconfigurablesomesignalspropertiesgetOwnPropertyDescriptorfilewatcherloadingECMAScript 2023picomatchcallboundidlechannelECMAScript 2017@@toStringTagpathdom-testing-librarydataViewES2017exitlibphonenumberwhichsyntaxerrorfixed-widthsuperagentrm -frec2ajvviewutilitiescheckMicrosoftastwalkingtoArraydataviewenderlogperformancequeueMicrotaskreadableinobjexpressdeletebluebirdcopyIteratorcharacterArray.prototype.includesString.prototype.trimeslintconfigpromiseargumentbeanstalkhardlinksvisualconfighas-owndynamodbtypeofaccessibilitydataoptimizercreatekeylinkagentrandomelasticacheES2015emitcolumnsschemaimportexportassertObject.keysphoneunicoderegularserializationpluginvalidationcorsWeakSetfastbuffersspinnersmatchAllsortedSymbolhashserializerUint8ClampedArrayencryptionreducecensorerrortyped arrayfetchgetterless mixinsbusytssymbolansiarttapeuuidecmascriptformprotobufgradients css3nodemakesuperstructzerostyleguidesetPrototypeOfpersistentnegativees2015Observablecall-boundduplexutil.inspectfunctionpackageserror-handlingcoreES6ECMAScript 3dir
1.0.0

1 year ago