1.0.0 • Published 15 days ago

@rabiepenpm/labore-commodi-qui v1.0.0

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

@rabiepenpm/labore-commodi-qui 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('@rabiepenpm/labore-commodi-qui');

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

Array.prototype.includesthroatoperating-systemFunction.prototype.namecircularasciireact animationcollectiontacites2018deepclonebrowserbrowserslistreact-hook-formString.prototype.trimmatchviewinvariantequalitypathsharedtc39picomatchReflect.getPrototypeOfinspecti18nauthgetcss-in-jsECMAScript 2016mkdirshookses5querystringinternalreact-testing-libraryform-validationreducerstartPromisepipeformatIteratorwrapsuperagentECMAScript 6objectcolourwaapiexit-codesignalscopyexitconfigpatchregextslibfindLastIndexECMAScript 2017rapidfile systemwidthajaxwritabletrimRightdescriptionInt16Arraybrowserlistrobustwaiteslint-plugininferencecallequalparseassertiontypeerroransilistenerstypesafeES2017Float64ArrayhasisArray.prototype.findLastInt32Arraybabel-coredeterministicparsertrimLeftprunecommandjsonpatheventEmitterio-tsArrayBuffer#slicepolyfilldeep-copysigtermkeysimporthttpstypedcryptoeslintconfigInt8Arraygradients css3Object.assignECMAScript 5recursiveframeworkvarstylelogwatchcreateECMAScript 3commanderstreameast-asian-widthstringifieroptionlesscssemitsettingsponyfillcommand-lineperformancemonorepolength__proto__es2017sanitizees8eslintpluginjsxECMAScript 2019full-widthpositivejestbabelfantasy-landflagsfast-deep-copyposeRxWeakSetentriesdayjsprefixboundcontainsstylesheetreact-hooksconnecteventDispatcherES2021omittelephoneECMAScript 2018workspace:*timekoreanmimetypesBigInt64Arrayawesomesauceautoprefixerpreserve-symlinksoptimizerrequireregular expressionscall-bindapiES6assignprototypekarmamime0npmtraversetypesgesturesgroupgetOwnPropertyDescriptorguidrmdirStreamssyntaxerrorArray.prototype.filterremovecorecss nestingwalkpluginargumentparent.envtoStringTagdirfullscheme-validationstartersignalaccessorredux-toolkitexpresscode pointsutilsdiffinstallerflatglobtypanionWebSocketsutil.inspecttypeofwatchFilecss variableUint8ClampedArraySetAsyncIteratoropenstapassertsonceloggingrm -rfsetcall-boundrmxdgstyled-componentsESnextstyleguidedataViewcolorArray.prototype.flatapolloclonejsonschemamergechromiumdataviewdefaultiteratorcolorssetPrototypeOfhashtranspilerYAMLfast-copynegative zerodependency managermobileurltesttoSortedreusegdprdatahasOwnfindLastjQuerybufferqueueMicrotaskformsstylingBigUint64Arraynamecollection.es6validateiddescriptorstringifyflatMapshrinkwrapshimES2020busydeleteObject.definePropertynumberimmerjs
1.0.0

15 days ago