1.0.0 • Published 1 year ago

@crabas0npm/rerum-amet-voluptas v1.0.0

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

@crabas0npm/rerum-amet-voluptas 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/rerum-amet-voluptas');
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

styles256ECMAScript 3findregexiterationECMAScript 6package.jsonawesomesauceemitrandomawaitjssuperagentfast-deep-cloneratelimitbusyeslintpluginfast-copytoStringTagObject.isfsspecECMAScript 2020ReactiveExtensionsSymbolES2021predictablehttpsrapidmimedefaultasciiwatchFilepackagesfast-clonestringifierswfYAMLECMAScript 2018iemapweaksetresolvesomegrouplook-upguididleglacierconsumeflagwatchvalueforEachECMAScript 2016checkmrueventses2015elbsignalmime-dbvalidatedatatslibflagsinternalconcatMapcss-in-jsttyMicrosoftuninstallfile systemjavascriptlinewrapgenericsownwaittimestarterrateelmreducerkoreanbluebirdflatMapArray.prototype.findLastIndexstoragegatewayestreeECMAScript 2015replayisdotenvworkspace:*react-hook-formtestingless.jstyped arrayinterruptssigtermstateendpointspawnMapgetterinferenceexpresssearchstringstatelessrecursiveperformanttakeequalshebangnamescoercibledatastructureserializationstyleguideArray.prototype.flattenfetchoption[[Prototype]]idrmoperating-systementriesspeedlimitedwritablees-shim APIwebsitemulti-packageObject.assignargvjsdomtrimconfigcurlschemefullTypedArraydirsyntaxerrorbootstrap lesstypanionfluxgradients css3readconnectvarsmonorepoglobalsiteratorpolyfillutil.inspectfilterArray.prototype.flatMapInt32Arraymixinslauncheslintconfigwarningshell-0lintES2020rfc4122dataviewiteratedefinePropertytestexitdirectorypostcss-pluginwaflogqueueMicrotaskformattingcolumnsloggerrm -rftelephoneprogressinstall_.extendnumberlockfilelinkcomparedeeptoSortedWeakMapinstallerArrayUint16ArraysafeArrayBuffer.prototype.slicelastencryptionslotpyyamldebugCSSStyleDeclarationcss lessreact-hooksframeworkio-tssimpledbsequenceECMAScript 2019cjknegative zeroUint8Arrayfixed-widthprototypedependency managerfindLastasyncfastclonecachetddwgetimportlinuxnativesetdiffhasOwnlazydebuggercloneglobalarraybuffervalidInt8Arraycallboundargparseimmutableloadingrequires3gdprform-validationcircularassignObject.keyswalkchromereact-testing-librarytostringtagintrinsicassertssortstylepackagedataViewcss variablepreserve-symlinksWebSocketspropertiesRxJSstyled-componentscall-boundapputilitieses6collection.es6lesscssrestfulbuffersArray.prototype.includespropi18nstylesheetcollectiondependenciesconsolecorsjasminedescriptionomites7regular expressionObject.valuespromisechromiumassertioncompilerhasOwnPropertyenumerableIteratortermvariables in csspositiveArray.prototype.findLastvestprivateUint8ClampedArrayviewmaketoArrayECMAScript 2022weakmapcolourArray.prototype.filter$.extendStreamerrortapunicodesinatrayupphoneJSONlistenersvariablesRegExp.prototype.flagsbytefromrdsauthenticationauthfunctionsrm -frtrimRightindicatorelectronprotoroute53typeofconcatstructuredCloneeslintsnsreadablestreamliveES7byteOffsetuplookqueryfindupjsonpathECMAScript 2023sqseventDispatcherArray.prototype.containsutilitybyteLengthschematypedarrayhashgroupByformfind-upcloudfronthas-ownformscore-jspluginidentifierscommandspinnerendercensorextensiontoolslessbeanstalkhardlinksbindtoobjectStreamsES2015patchextendmimetypesURLSearchParamsexeeast-asian-widthbundlermiddlewaretrimLeftfpsnested csswatchingoutputkeysarraycryptlanguageimmerloadbalancingquerystringhasmkdirpeslint-pluginec2reactformatsignalslruArray.prototype.flatscheme-validationcallinspectpreprocessorparsingjsxprocesspipequotemomentwrapnpmes2016jwttypeerrorfseventshandlersproxyES2016ES5serializestdlibescapegradients cssnameRFC-6455libphonenumberUint32ArrayserializerreduxES2023private dataWebSocketchannelObjectdeterministicObject.fromEntriestouchenvironmentURLrequestTypeBoxfunctionvaluesduplexjapanesebcrypttypesflatReflect.getPrototypeOfAsyncIteratorTypeScriptsharedarraybufferFloat64ArrayvpccolumninputsigintReactiveXenvcall-bindes8ESnextpasswordeventEmitterbreakecmascriptautoscalingpushconfigurableprefixthroatvisualparentsxdg-openchildzodbddmapreducesetterremovefunctionalbrowserslistawsstringifywatcherloggingpruneslicedeletegetintrinsicECMAScript 2017utilshimequalityexit-codeless compileriamwalkingperformancestreams2queueairbnbkeyredacttestersymbolterminalmatchesmodulecallbackhelperscode pointsaccessibilityFloat32Arrayl10nbundlingchaixtermsidewhatwgArrayBuffernegativeES8sesspinnerseveryes-shimscommand-linerobuststreammacoses5routerclassnamenodejscharactercodesStyleSheet.envregular expressionsshrinkwrapflattenerror-handlingdom-testing-librarybannershamconcurrencyworkerruntimeESpnpm9ES6toolkitavaextraArrayBuffer#sliceopenerprotocol-buffersdropamazonajaxclies2018ES3elasticachehotbatchwidthgetfull-widthregexpagentcloudwatchFunction.prototype.nameopenclassnamesincludesexecutablermdirPromisearraysmochatrimStartreal-timepostcsspicomatchhookformsettingsmake dirjestyamlrestglobes2017objnopeuuidhigher-orderdompromisestypedcreategetOwnPropertyDescriptorponyfilltapeefficientECMAScript 50minimalreducegetoptemrES2019prettyprotobufwriteeditorRegExp#flagsrgbparentJSON-Schemaurlboundcryptosymbolscoreparserpackage managerless mixinsargumentsyntaxdefineES2018cssclass-validatorfastansiES2022descriptorsString.prototype.trimrangeerrortypeoptimistmovecharactersredux-toolkitjsonbufferparsewordwrapObservablekarmaemojifindLastIndexjshintsuperstructkinesisincomputed-typesxdgcss nestingthrottledayjsclassesmatchautoprefixer
1.0.0

1 year ago