1.0.0 • Published 1 year ago

@f1stnpm3/atque-ex-nulla v1.0.0

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

@f1stnpm3/atque-ex-nulla Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Which kind of Typed Array is this JavaScript value? Works cross-realm, without instanceof, and despite Symbol.toStringTag.

Example

var whichTypedArray = require('@f1stnpm3/atque-ex-nulla');
var assert = require('assert');

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

assert.equal('Int8Array', whichTypedArray(new Int8Array()));
assert.equal('Uint8Array', whichTypedArray(new Uint8Array()));
assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray()));
assert.equal('Int16Array', whichTypedArray(new Int16Array()));
assert.equal('Uint16Array', whichTypedArray(new Uint16Array()));
assert.equal('Int32Array', whichTypedArray(new Int32Array()));
assert.equal('Uint32Array', whichTypedArray(new Uint32Array()));
assert.equal('Float32Array', whichTypedArray(new Float32Array()));
assert.equal('Float64Array', whichTypedArray(new Float64Array()));
assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array()));
assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array()));

Tests

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

exitjestString.prototype.matchAllauthenticationcss variablefast-deep-clonehasjsonpathobjMapECMAScript 2021lazydomidleelmrobustStyleSheetelbsetImmediatecallboundsettercharactersrgbreadabledatastructureES2017taptrimLefttypedarraystypescriptcollectionconfigObject.entriesrdsparentoutputsettingsinferencecalldataviewcrypteventDispatcherqssnstypedredactCSSArray.prototype.containsperformancehttpsargumentsyntaxerrorgroupreduceriteratorECMAScript 2019bufferrapidES5globkoreanutilityponyfillestreedeepclonepolyfillexeccheckoptionmimetypeswatchurllogginglistenersassertionnegative zerosigtermsymlinkassignpropertiescreatequeueMicrotaskajvclassnamesregular expressioneventsES2015toSortedchromiumrecursivedirectoryfind-upides2017viewcallbindYAMLtsratelimitJSON-Schema.envbyteOffsetchaiUint32Arrayes7arraybufferfetchmimeserializeECMAScript 6inspecta11yconcurrencysequencestreamObject.assignhandlerschinesenodenodejswalkdropbeanstalkrm -rfbdddayjsstringifierwrapflagsbuffershigher-orderPromiseUint16ArrayStreampromiserfc4122jsonworkflowsharedarraybufferroute53symbolObservablesArrayBuffer#slicecopydependency managerequalform-validationemrwindowswhichnativelintfigletautoscalingArray.prototype.filterhelperscodesECMAScript 2020URLfullpushyamldescriptormatchspeedtraversecssbytesignalsdifflesstyped arraywatchingtypefast-deep-copyHyBipackage manageres5schemagetOwnPropertyDescriptormergestdlibless compilerstarteres8sigintjasmineFloat32ArraygroupBysortedtestinghasOwnPropertyiterationseslinkbyteLengthtslibautoprefixerObject.isstatelesszodlanguagecloudfrontECMAScript 2018tc39propmkdirdefinePropertysidemakewaitpackageflatMapes2016touchfilterfunctionfilewritetypesstringES3stylingconcatclassnamewritablegdprlinuxargvjapaneseFunction.prototype.nameec2operating-systemfull-widthsetcensorreadstablecurlbatchcall-bindgetPrototypeOfelectronbrowsernamesfluxes6packagesES2022kinesises2018endermapless mixinsfpsiterateformattingregexInt16ArraydebuggerswffindLastkarmaunicodeObject.valuesvestmatchAllappenumerableTypedArrayReflect.getPrototypeOfartclassesqueryawaithookformexpressionfseventsnopeObject.getPrototypeOftoobjectObject.definePropertyBigUint64ArrayAsyncIteratorworkspace:*hashshebangrequestrm -frfastclonechromedescriptionpromiseswebmrupipefunctionsrestES2019argsfixed-widthvpcfullwidthlastbusyguidastUint8ArraymiddlewareSymbolreadablestreamStreamsparentsencryptionpositivegetaccessibilitybootstrap cssRegExp.prototype.flagsECMAScript 7internalvariableseverymime-dbhttpbundlingdescriptorsECMAScript 3rmtypeofjwtreusedotenvtimeprivate datagenericscloneArray.prototype.flattenReactiveXasciimixinsforEachlogwalkingtddpasswordfscommand-linepatchqueueieextendInt32Arrayelasticachecharacterflat__proto__Array.prototype.flatutil.inspecttrimStartPushomiteslint-plugineventEmitterbrowserlistcolorfast-clonebluebirdprotobufshrinkwrapmoduleimportsearchsuperstructString.prototype.trimwarningirqpyyamlcloudformationoptimizersignalparseravatoStringTagapierrorlesscssrate$.extendfast-copyglaciercoresameValueZerosymbols@@toStringTagpostcss-pluginjsdomruntimemacosgetintrinsicarraytypeerrorio-tsconcatMapupphoneprivatestylestakeinternal slotdatefindLastIndexhardlinksxtermECMAScript 2015compilerjsgradients css3flagfastcopyresolveUint8ClampedArraysinatraebsi18nintrinsicecmascripttypesafeRxJSECMAScript 2022mkdirpcomputed-typesthroatjQueryreplaybundlerenvzeroURLSearchParamsaccessorwidthUnderscoredeletesharedextrathrottleprototypetermSetfindawesomesaucehasOwnSymbol.toStringTagprocessproxyscheme-validationlivedatapicomatch0randomregular expressionsansies-abstractweaksetloggerclass-validatormonorepoterminaleslintconfigbindoncemomentserializations3variables in cssless.jsArray.prototype.findLastIndexjsxpersistentregexpspecmapreduceCSSStyleDeclarationfunctionalsimpledbcss nestingcjkequalitypropertycommanderECMAScript 5circularlockfilemochaextensionsyntaxtoArraynegativecloudwatchduplexl10nprettysetPrototypeOfimmercloudtraillooknamenested cssefficientdataViewnumberfolderpreserve-symlinkstelephone[[Prototype]]deep-cloneMicrosoftenvironmentmkdirsreactwatchFiledependenciesES6tostringtagparsetoolscollection.es6css-in-jsdebugcomparecontainsdeepcopybannerInt8ArrayformisConcatSpreadableredux-toolkitlimitedlimitkeyObservablestyleguideisroutermetadataObjectreact-testing-libraryES2021removeobjecthotES2020make dirstyled-componentsmulti-packagestylesheetIteratorES8deep-copycommandtextECMAScript 2023prunesortspinnersymlinkscolorsinsafenpmstreams2pnpm9es2015preprocessordynamodbFloat64Arraysliceuninstallcliloadbalancingroutepackage.jsoncompile lesswordbreakpostcsssuperagentWebSocketsregularReactiveExtensionspluginimportexportwatchervaluesinterruptsrequireindicatorarktyperoutingbootstrap lesstrimEndWeakMapreal-timefromrangeerrorstructuredClonestoragegatewaycryptoeslintpluginreducewhatwgeslintcachewordwrapttystatusvalidateconsoletoolkittaskloadingcss lesshookswafassertexpresscore-jsObject.keysArray.prototype.includesflattenshell_.extendreact-hook-formutilitiesmatchesESnextTypeScriptes-shim APIperformantless cssconfigurableyupoffsetargparsereact-hooksES2016connectdefineweakmapslotArrayBufferlibphonenumberes-shimsdeterministicArrayBuffer.prototype.sliceownutildom-testing-libraryauthjsdifftester-0tapecall-boundmodulesfile systemminimalstreamsajaxbreakparsingECMAScript 2017deepwgetcorsarraysES2018column256uuidtrimArraykeysreduxgetteresbrowserslistasyncJSONprefixshamWeakSetdirTypeBoxES2023optimistRegExp#flagsRFC-6455fastinputpathprotoESrestfulinvariantairbnbassertsframeworkcolumnsschemestyleWebSockettrimRightquerystringlinewrapawsconsumecallbackescapeentriesstatevalidationshimeast-asian-widthimmutablelruvalidcolourformatstringifyBigInt64Arrayincludesopenworkerinstallerexit-codeArray.prototype.flatMapprotocol-buffersfindupendpointArray.prototype.findLastxhrjoicode pointsformsRxgradients cssspinnersObject.fromEntrieshas-ownES7typanionserializerprogresscoercibleECMAScript 2016testfastifyamazonlengthsomeagentvaluemovermdiremitchannelgetoptbcryptvisualerror-handlingquotesqscloudsearchjavascripttypedarraylook-up
1.0.0

1 year ago