1.1.10 • Published 1 year ago

@juigorg/quibusdam-sapiente v1.1.10

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

@juigorg/quibusdam-sapiente 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('@juigorg/quibusdam-sapiente');
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

consumeformsloadbalancingqueueMicrotaskcallbindArray.prototype.flatframerflagforkpinoargvreact animationexpressmkdirweakmapArrayBuffertoStringTagimmershebangyamlgroupBycensorefficient.envuninstallguidarrayscss-in-jsObject.fromEntriestoSortedspawnES5postcsstimettyECMAScript 2023concatfind-upflatdeep-copypnpm9arktypechannelmapreducegetOwnPropertyDescriptorhas-owniterateaccessorprocessserializerInt16Arraycheckdeepweaksetbabel-corejoistylingrmdiridentifiersthreeStyleSheetcall-bindbuffertypedUint8ArrayzodObservableemrreduceoptionRxflatMaptransformsource mapfindLastIndexjQuerytrimEndes-shimsgetintrinsicbddString.prototype.matchAllelectronredirectfindhooksmergeframeworkshrinkwrapanimationwhichchaieffect-tskinesisnopecode pointsreactspinnerrecursivecloudtrailES7lru_.extendtrimLeftnodees2016validReactiveExtensionsmanagerdefinemapmulti-packageBigInt64ArrayPromiseexpressioneventsimmutableininvariantexecfilesqsredux-toolkitArrayBuffer#slicel10nschemarm -rfnpmcjkvariablesECMAScript 2020istanbulequalitynegative zeroStreamscolourStreamECMAScript 2021siderfc4122whatwgdiffsameValueZeroWeakSetkeyloggingchromeinternal slottypedarraywalkfigletcommandloadinghookformflattentyped arraypopmotionutilvalidationfastcopyUnderscoreassertionownform-validationUint32Arrayprivate datadataapolloacornsharedarraybufferwebconfigurablezerojshintArray.prototype.findLasttapmkdirpsymbola11yString.prototype.trimcommand-linevalidateclassnamelockfilewaapibinaryrmcorerssbufferstddinternalSymbolJSONasteriskseventEmitterimportbyteOffsetmockinginstallercall-bounddomdateclientqueuecompilerroutingautoscalingcloudwatchurlmatchAllrapidECMAScript 2019preprocessorfront-endwaitsuperagentfunctionwafcolores-shim APIrdsdynamodbsimpledbfixed-widthemojijson-schemabusyWebSocketstringifytapeerrorworkflowarrayES3shimmonorepoapirm -fr6to5tacitdescriptionclassnamesnpmignoredeepcloneasciiperformancepositiverobustautoprefixersubprocessenderfull-widthstructuredClonecharacterstostringtagindicatorRFC-6455ES2023package managerspinnerssomeURLcloudsearchmomentlastes8gitignorepatchendpointshellhardlinks$.extendlinkfantasy-landdataViewairbnbdebuggerhigher-orderkarmawritablefpincludesminimaljson-schema-validatorCSSStyleDeclarationgetterpropdeterministicUint16ArraydotenvmodulematchbyteLengthuser-streamsreuseESnextcodesvalueECMAScript 6fromparsesymbolsonceeslintconfigObject.assignregular-expressionfunctionsuuidmockemitES2019fetchcollectionbundlingtransporthelperses6definePropertydeepcopyes2015envsinatraregexclassesreversedhtmlURLSearchParamstoolkitbrowsertermregexpparentsjestproxy256environmentsprototypejsonbannerprefixmobilefnmatchlibphonenumberxmlmake dirflagsformamazonruntimemanipulationInt32ArrayyupiamregularzxES2020koreancallboundqsYAMLignorequeryexecutefastclonefindLastconcatMapvestastreducerstreamsidlematchesschemefile systemawsmakehasOwneventDispatcherreadablephoneavapyyamldeep-cloneECMAScript 2022browserlistletvarfullarraybufferjapanesetraverseecmascriptObjectasyncCSSnegativecssquerystringgdprajaxfastMicrosoftslotsafecommanderchinesekeyswarningeslintramdapolyfillRegExp.prototype.flagstypedarraysObject.keysprettynodejstslibjsxstarterreal-timecryptologstyleguidehelperpluginSettypesafetelephonePushjsonschemacopyelasticacheupxhrcallgetdataviewdrop-0utilitiesrgblocationreact-hooksWeakMaprangeerrorpathterminal3dformattinges2017optimizerObject.definePropertyECMAScript 2017compareserviceassertartES6localMapesFloat32ArraypackagesconsolehandlercloudformationjsdiffsestranspilerjsdomfunctionalparsertypeglobtoArraydependenciesrequireserializefastifydeleteboundansitoobjectTypeScriptloggergraphqlAsyncIteratorECMAScript 2016readablestreamglobalsvpcutilityObject.valuesdircontainssuperstructRxJSinstallgroupprunereduxrouterrulesenumerabletypanionInt8ArrayIteratoriteratorvarscharacterpropertyArray.prototype.findLastIndexeslint-pluginES2022xtermpropertiescreate
1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago