1.5.88 • Published 11 months ago

@hishprorg/nisi-quos v1.5.88

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@hishprorg/nisi-quos 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('@hishprorg/nisi-quos');
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

ES2018popmotionimportUint8ClampedArrayproxyinstallerprotocol-buffersuninstallinstrumentationprefixspeedes2018phoneanimationfindLastmrumanagerjscloudsearchtyped arrayECMAScript 2020filterwalkinvarianttermcomparequeueMicrotasknativefunctionforkrfc4122internal slotbabel-corewhatwgnpmignoreprune[[Prototype]]regexpelectronArray.prototype.flatMapregular expressionregexreversedebuggerdynamodbJSON-Schemaes2015lockfiletranspilecolourReactiveXletfast-deep-clonetypesgroupeast-asian-widthsharedarraybufferObjectclassnameassertionwgetsubprocessbrowserslistdataviewatomjavascriptgesturesnamehasOwnzerohashObject.assignloadbalancingcloneroute53bundlingeslintconfigyupcoverageinputmetadatafastbytetoStringTagcurried.gitignoreconfigurabledeterministicWeakMapes-shimsmatchcoregitignoreserializationpackage managerroutejestwidthreusegetintrinsicStreamnodeerrorInt8ArraywebstylesweaksetArrayrangeerrorreact animationrandompatchparserreduxexecfilelastqueryfindreworkimportexporties3ECMAScript 3react-hook-formsearchArray.prototype.includesuuidtoReversedenvironmentssymbolschannelcurldotenvArray.prototype.flattencachedependency managerpositiveimmerjQueryfeedeslintpluginfastclonecolumnstyleguideArray.prototype.findLastIndexsettingsvalidationconsumelinkprivateconstarraybufferxmlponyfillinferenceprettycoercibleflatMapstyled-componentssource maprequireeventEmitterparentflattenreal-timeiterateSymbol.toStringTagnodejsbeanstalkzodworkflowlibphonenumberperformancesortsetPrototypeOfhelperexpresssameValueZerogetPrototypeOfES8readableargves6ramdaaccessordataViewsharedPromiseajvRxtypedarraysdescriptiondeleteTypeBoxcomputed-typesentriesreadablestreamarraystypescripttypedarrayECMAScript 2022reducervestamazoninstallnamesoptionconsoleECMAScript 2017bannergenericsrm -rfmoduledeepyamlinjson-schema-validatorparseexpressionunicodebrowserlistairbnbrestfulvpc6to5tacitFunction.prototype.nameasteriskscontainscloudfronteventsgetarktypepropmulti-packageesistanbulchromiumqueueYAMLsinatramapdayjsfulldireffect-tstapecallboundreact-testing-libraryObject.fromEntriesavastylepostcssrsslistenersPushnumberwafintrinsicStyleSheettoolkitmkdirread0look-upgdprhas-ownglobal this valuegraphqlframeworkhelpersjson-schema-validationredux-toolkitflagindicatorFloat64ArrayelbreducefindLastIndexglobal objecthttpsgroupBytyperobustemojies2017jsonschemacallbindautoscalingrgbRFC-6455ECMAScript 7buffersreversedlogginghardlinksautoprefixerio-tsshrinkwrapregularcollection.es6__proto__movehigher-orderCSSStyleDeclarationmergewindowglobalsspinnertesterqschaipromisedeepcopypackage.jsonshellWebSockettoSortedapptostringtagECMAScript 6mkdirpjoimanipulationmobile256circularSetcallbackArrayBuffer.prototype.sliceInt16ArrayxhrperformantequalityArray.prototype.flattouchsymlinksdropstringwaitcryptoomitworkermaketypanionbddtraverseimmutablegettercloudtrailiteratorrulesidlepinostablestylingURLclass-validatordomhasOwnPropertypyyamlpathlocationecmascriptassignstoragegatewaydescriptorbinariesgetOwnPropertyDescriptorstructuredClonefastcopySymbolregular-expressionlogWeakSetMicrosoftmatchAllcensorsuperagentcheckextracommand-linesortedutilitiesbabeldescriptorseveryxtermArray.prototype.containsdiffcall-bindcolormatchesInt32Arraythreekoreanfind-upawseslint-plugintc39utilweakmapsideReactiveExtensionscompilerBigUint64Arrayutil.inspecttrimRightoptimistl10nspringpipecode pointsoffsetincludesspinnersESmonoreporouterpropertiesprocessspecconcatMapRegExp#flagsglaciercloudformationharmonybusystringifier_.extenddeepclonerm -friamquotelengthpurereactArray.prototype.findLastcall-boundtypeofAsyncIteratorfunctionaltslibmochaObject.isflagsshames-shim APIenumerablelanguagedom-testing-libraryfpsacornbintoolsserializetaketranspilersimpledbinternalcolumnsECMAScript 5fantasy-landvarsjasmineclassnameseslinthooksObject.definePropertyglobalThisES7swfUint32ArrayString.prototype.matchAllvisuales8fullwidthBigInt64ArrayremovetoArraypicomatchcommandObject.valueseventDispatcherapiexecterminalESnextvalidateuser-streamschildes5ES5streamschinesecopyObject.keysprogresssafestringifyformatframersuperstructpnpm9form-validationoncestreamfixed-widthargsscheme-validationbyteLengthES2015colorsttytapslicechromeescapeestreecore-jsec2modulesjshintapollotestrequestbyteOffsetES2021callquerystringsnsisConcatSpreadablefast-clonefolderObject.getPrototypeOf
1.5.88

11 months ago

1.5.87

11 months ago

1.5.86

11 months ago

1.5.85

11 months ago

1.5.84

11 months ago

1.5.83

11 months ago

1.5.82

11 months ago

1.5.81

11 months ago

1.5.80

11 months ago

1.5.79

11 months ago

1.5.78

11 months ago

1.5.77

11 months ago

1.5.76

11 months ago

1.5.75

11 months ago

1.5.74

11 months ago

1.5.73

11 months ago

1.5.72

11 months ago

1.5.71

12 months ago

1.5.70

12 months ago

1.5.69

12 months ago

1.5.68

12 months ago

1.5.67

12 months ago

1.4.67

12 months ago

1.4.66

12 months ago

1.4.65

12 months ago

1.4.64

12 months ago

1.4.63

12 months ago

1.4.62

12 months ago

1.4.61

12 months ago

1.4.60

12 months ago

1.4.59

12 months ago

1.4.58

12 months ago

1.4.57

12 months ago

1.4.56

12 months ago

1.4.55

12 months ago

1.4.54

12 months ago

1.4.53

12 months ago

1.4.52

1 year ago

1.4.51

1 year ago

1.3.51

1 year ago

1.3.50

1 year ago

1.3.49

1 year ago

1.3.48

1 year ago

1.3.47

1 year ago

1.3.46

1 year ago

1.3.45

1 year ago

1.3.44

1 year ago

1.3.43

1 year ago

1.2.43

1 year ago

1.2.42

1 year ago

1.2.41

1 year ago

1.2.40

1 year ago

1.2.39

1 year ago

1.2.38

1 year ago

1.2.37

1 year ago

1.2.36

1 year ago

1.2.35

1 year ago

1.2.34

1 year ago

1.2.33

1 year ago

1.2.32

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.30

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.27

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

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