1.0.0 • Published 21 days ago

@crabas0npm/dolore-est-nihil v1.0.0

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

@crabas0npm/dolore-est-nihil Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on instanceof or mutable properties, and despite ES6 Symbol.toStringTag.

Example

var isTypedArray = require('@crabas0npm/dolore-est-nihil');
var assert = require('assert');

assert.equal(false, isTypedArray(undefined));
assert.equal(false, isTypedArray(null));
assert.equal(false, isTypedArray(false));
assert.equal(false, isTypedArray(true));
assert.equal(false, isTypedArray([]));
assert.equal(false, isTypedArray({}));
assert.equal(false, isTypedArray(/a/g));
assert.equal(false, isTypedArray(new RegExp('a', 'g')));
assert.equal(false, isTypedArray(new Date()));
assert.equal(false, isTypedArray(42));
assert.equal(false, isTypedArray(NaN));
assert.equal(false, isTypedArray(Infinity));
assert.equal(false, isTypedArray(new Number(42)));
assert.equal(false, isTypedArray('foo'));
assert.equal(false, isTypedArray(Object('foo')));
assert.equal(false, isTypedArray(function () {}));
assert.equal(false, isTypedArray(function* () {}));
assert.equal(false, isTypedArray(x => x * x));
assert.equal(false, isTypedArray([]));

assert.ok(isTypedArray(new Int8Array()));
assert.ok(isTypedArray(new Uint8Array()));
assert.ok(isTypedArray(new Uint8ClampedArray()));
assert.ok(isTypedArray(new Int16Array()));
assert.ok(isTypedArray(new Uint16Array()));
assert.ok(isTypedArray(new Int32Array()));
assert.ok(isTypedArray(new Uint32Array()));
assert.ok(isTypedArray(new Float32Array()));
assert.ok(isTypedArray(new Float64Array()));
assert.ok(isTypedArray(new BigInt64Array()));
assert.ok(isTypedArray(new BigUint64Array()));

Tests

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

outputtypeofpicomatchlanguageposeindicatorfunctionsswfdynamodbCSSes8arraybuffercommand-linecolorscloudwatchpredictablemkdirpmimetypesgenericstoStringTagjsdiffrateelmobjpipeHyBideepclonethreerapidscheme-validationECMAScript 2016wordbreaktypedarraysES2023clilimitkarmaparsinges5rgbreact-testing-libraryECMAScript 2020consolelibphonenumberfindeslintStreamapollospecconfigurableweakmapchannelJSON-SchemaargvRegExp#flagssuperagentcssless mixinsmulti-packagewalkponyfillfssymlinks3linktoSortedinternalpersistentjapaneselengthidtypedcss lessargscolumnjwt@@toStringTagcjkrandomECMAScript 2023interruptscorsentriesenderdescriptorsiteratorworkersharedtesterdeep-cloneECMAScript 2019css-in-jsttydropcompareArray.prototype.findLastIndexsharedarraybufferwindowsES2021taskmatcheshookformpropertiesfindLast256dataRFC-6455Int16Arraytimeeslintpluginajaxbuffersnpmapistylenameeslintconfigbreakcoerciblelook-upsiderobustremovearrayswaapihigher-orderconsumeexpresssearchtypesrdsanimationpackage.jsonmodulestypescriptECMAScript 2015es-abstractcontainsESnextmacosflagkeysmkdirsgradients cssreadableloadingcolourchromiumfunctionalinspectjavascriptjsdomvalueclientparentsredactdeeppolyfillmiddlewarebeanstalkhasES2019promisesdependenciesmoveassignnegative zeroformattingavabatchreact-hook-formdeterministicStyleSheetserializationinstallerdom-testing-libraryduplexloadbalancingmochaReactiveExtensionsstylesheettypeerrorsetPrototypeOfimmutableroute53validationstarterutilitiescommanderrequireUnderscoregetPrototypeOfmergeArrayBuffer.prototype.sliceIteratorObservablesdebugslotless cssflatcss variablereducepnpm9Symbol.toStringTagESsymlinksqueuesesmruWebSocketratelimitvariables in cssstructuredClonecall-boundformatsigtermi18nObject.keysincludesSetchaisetjasmineparselimitedfile systemfluxfastcopyfull-widthES8compile lessfast-deep-cloneconnectelectronjsxbrowserslistcloudtrailReflect.getPrototypeOfchromechineseTypeScriptsetImmediatemetadatanamesstatelessmixinsstatusPushsequencees7liveextendsetterWeakMapbyteframergetpreserve-symlinkssortedauthenticationwatchingpluginrm -frrecursivetrimStartajvhelpersES2020cloudformationES2015cryptsigintwatcherendpointhas-owndiffReactiveXreduxtoolsMicrosoftintrinsictelephoneasciistringlogpushworkfloweveryresolvekeytypesafespinnersassertionArray.prototype.filterschemeutilmoduleebstrimEndguidfilterstateObject.definePropertyfastcloneperformantforEachstreamsbundleraccessibilityoncetrimmapreducephonespinnercallbacknodejsbrowserextraprivate datainferencel10nreusetoolkittoobjectES2022storagegatewaywatchFilewgetsliceArray.prototype.flatObject.valuescurl.envawsenvironmentbluebirdfixed-widthInt8Arrayserializerfpserror-handlinggdprbootstrap lesscheckminimaltermprotocol-buffersdayjsperformancetraversenativeES2016Array.prototype.flatMapmobile0omitemojiclassesstylingSymboljQueryhardlinksreactObject.isreact poseqsfiglettape_.extendmakeUint16Arraybootstrap cssio-tsreplayjestwaftsexiteslint-pluginisstreamcallboundutilityhandlersnumberworkspace:*createFloat32ArrayagentObject.assigngetOwnPropertyDescriptorclass-validatorFunction.prototype.namelookdataviewECMAScript 7sqsfileES3fast-copybufferArrayBuffer#sliceterminalcodeselbECMAScript 3querystringextensioninternal slotkoreanflattenpopmotiondebuggercirculararraygraphqlfunctioneventsflagspreprocessorECMAScript 2022WebSocketsbyteOffsetvalidateschemaxtermform-validationspeedproxywalkingwidthunicodeloggerprotobufcharacterdelete__proto__sameValueZerocallefficientparentautoprefixerpropertycensora11yECMAScript 2017streams2irqpyyamlcolorRxes2015promisereadablestreamieprunepropgroupByaccessorformhttpglaciermime-dbtoArrayequalmkdirinpututil.inspectcompilerdirclassnameshooksredux-toolkitsimpledbinstallcollectionhasOwndatecall-bindlintshebangreact animationArray.prototype.containsargparsestylescss nestingbyteLengthmatchAllrmvisualBigInt64ArrayisConcatSpreadableUint8ArrayspringreducersnsES6writablees2016tslibECMAScript 2018hotassertfulloptimistnested cssregexequalityurlUint32ArraydescriptionsignalsObject.entriesprototypedirectoryobjectcachecode pointstextes6CSSStyleDeclarationreact-hooks[[Prototype]]concatMapstringifiercharacters-0Array.prototype.includescryptoYAMLargumentlinuxzodec2requestartexpressioncomputed-typesuninstallwebarktypeMapECMAScript 5watchpackagesRegExp.prototype.flagsflatMapruntimenopepatchshimless compilerexecdescriptorpostcss-plugingradients css3find-upFloat64Arrayawesomesaucereal-timedeepcopyoffsetshamvaluesstyleguidethrottlepasswordautoscalinggetoptfastglobregular expressionsObjecttakecommandvariablestrimRightES2017URLSearchParamstestfolderObject.fromEntriestapcorecopyfast-deep-copyvpcArray.prototype.flattenhttpsauthdatastructureArrayES5serializeyupbusyconcurrencydotenvownString.prototype.matchAllcloudfrontpathquotepackage managerlazyfseventsconcattrimLeftsyntaxformsmomentfullwidthsymbolspackageimportyamlbindcloudsearchlinewrapexit-codematchregularsortprefixsignalArrayBufferairbnbmimeprivatenodemake dirbddenvviewfromnegativeweaksetfindupes2017vestvalidconfigObject.getPrototypeOfestreetostringtagshelldefineemitpostcsspositiveoperating-systembcryptURLupjsonidlerfc4122callbindWeakSetprogressdraguuidJSONgesturesparsercore-jscolumnsECMAScript 6dataViewbanneres-shimses-shim APIeast-asian-widthUint8ClampedArrayclonethroatenumerableRxJSrmdirreadescapesomeprocessString.prototype.trimdependency managerawaitstabletc39StreamsBigUint64ArraylastPromiserm -rffast-clonebrowserlistTypedArrayjoiObservableprotosettingses2018definePropertyES7Array.prototype.findLastiteratelistenerstyped arrayframework
1.0.0

21 days ago