3.9.97 • Published 10 months ago

@erboladaiorg/harum-natus v3.9.97

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

@erboladaiorg/harum-natus 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('@erboladaiorg/harum-natus');
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

bannergraphqlvalidationArrayBuffer.prototype.slicearraybuffereslint-pluginworkspace:*immutableArray.prototype.containstrimStartES2017Set$.extendBigInt64Arrayes2017symlinkstelephoneWeakSetidleassertfind-upObject.iscoverageconsumeCSStostringtagupdefinePropertyfast-deep-copywaapicall-boundreact-testing-libraryrandomfunctioninternal slotaccessoroptionenvironmentsstablenumbermake dirfullshellflatMapReflect.getPrototypeOfzodSystem.globalprefixextendObject.keysdayjsimportexportterminaltimesymbolproxysetreact animationutilityloadingconsttypeerrorprunespeedbundlingInt16ArrayStreamsdiffparsehasnopeenvironmentcloudwatchhasOwnECMAScript 2016binprotothreepropguidexpressionautoprefixerpropertyconsolelogpreprocessorpicomatchchannelregular expressionArray.prototype.findLastIndexloadbalancingchineseavatestrequestprivatefindupchromesescore-jsshamyamljavascriptlibphonenumberautoscaling[[Prototype]]inputlastclonewebmapreduceinferenceES2021asttoArraycall-bindmobilearraycomparezxES2023gdprfile system.gitignorelrucoerciblees2018bufferArray.prototype.flatMapTypedArraytsfindtrimEndES7visualmovetacitECMAScript 7ArraySymbolunicodeUint16ArrayagenthardlinksECMAScript 6valueelectronvalidl10nchildrm -frUnderscoreharmonyeventEmitterreact-hook-formkoreanponyfillmanagernpmignorees2015extraobjectsqsrmdircloudfrontsomeRegExp#flagseslintpluginECMAScript 2023forktranspilemochainspectWeakMapcollection.es6has-ownpackage.jsonYAMLiees7reuseredux-toolkitjQueryidartawesomesaucekinesisphone-0functionsdeep-copycontainseshashregexpindicatorflagprocessschemewritabletoStringTagjestdataviewperformancetoSortedsimpledbcolumnsrapidsyntaxbundlerelasticacheloggingcolorsetPrototypeOfqsmomentincludesregular-expressionObject.getPrototypeOfweakmapglobal this valuefetchgroupByCSSStyleDeclarationbddES5Observablesfigletlook-upString.prototype.matchAlllockfilerssnodewarningECMAScript 2021gesturesi18nrgbelbObject.definePropertypopmotioncalltddefficientfast-deep-clonesortedgenericsdescriptorRxlengthpolyfillrecursivejsdiffletemrreadablereadablestreamspecglacierfunctional256iteratornamejsargspackagequerystringTypeScriptserializationexecArray.prototype.filteroptimizerES2015acornpinocommand-linees-abstractiamfsInt32Arrayfunction.lengthbindtakecallbackroutersinatralocationperformantclassesArrayBuffer#sliceclijasmineprototypeconcatMapmodulestreamcallbindtermUint8ArraysideespreespinnersArray.prototype.flattencssURLSearchParamsdynamodbrmdotenvBigUint64ArrayTypeBoxcurlstarteranimationcss-in-jsdebuggerreverselintapp0classnamesreadamazonpyyamlmatchAllwhatwgwhichMicrosoftposenpmglobalslotequalswfremoverangeerrorshimarraysstyleregexyupasterisksapollojshinthooksworkerserializertypeofinvarianttranspilerpatchInt8Arrayviewredactes-shim APIgetmergeReactiveXjsonschemametadatadataViewpromisefast-cloneObjectbabel-coreprivate dataa11yStreambabelinstallerjson-schema-validatorframeworkeventDispatcheremojiECMAScript 2019runtimedescriptorsgetterstringifyrestfulprotobufkarmainstallcloudsearchinternaldeepclonekeyurltypesObservablearktypedebugbuffersvarsReactiveExtensionsPromisewriteinJSON-Schemachailanguagevpcjson-schema-validationdom-testing-librarytoolsrequireECMAScript 5ES6fastifybrowserslistframerfastclonerm -rfintrinsictrimRightreverseddeepfiledirectorygetOwnPropertyDescriptorWebSocketsminimaltraversestylesevery__proto__globalThismakeprotocol-buffersstyleguidetoobjectapies8Object.assignttyenumerablextermutil.inspectcharactersSymbol.toStringTagES8postcss-pluginexpressrulesregular expressionsparentwalkingArrayBufferutilstoReversedwafes6reactgetintrinsicredirectreworkbinarywaitlocaldatepathequalityStyleSheetsetteridentifierscurriedtoolkitvartransformdropiteratewidthfoldertc39binariesflattenlookES2020structuredClonefilterkeysflagsESnextECMAScript 2022s3fantasy-landec2formsWebSocketdeterministicforEachmatches3dgetPrototypeOfclassnameslicehttptextfromclient@@toStringTagglobalseslintfpenderroutingECMAScripttrimLeftform-validationsharedclass-validatorcallboundobjistanbulhelperdataajaxregularshebangpureglobfindLastIndexenvhigher-orderjapanesecomputed-typesargvcolorsfastexecutetypescriptcloudtrailJSONfindLastObject.valuesassertionsuperagenteventsasciifpstypeloggerbyteLengthECMAScript 2020subprocessfullwidthreal-timesetImmediatecryptomodulesio-tscolourqueuemonorepoisConcatSpreadabletesterpoint-freeprettygetoptschemaignoretypednamesoffsettyped arrayinstrumentationpackage managervariableswgetprogresssnsfastcopyselfcircularresolvehelperswindoweslintconfigpluginpackagesconfigurablesortdependency managerObject.entriesObject.fromEntriesasyncsyntaxerror_.extendjsdomdefinemkdiroutputjsonfixed-widthbrowseraccessibilitycreate6to5trimString.prototype.trimajvomitquotecopydeletelistenerssymbolsramdadeepcopyerrorimmercodestapstreamstapeonceURLisexecfilebusydependenciesshrinkwrapxhrreducepostcssES3HyBiserializenegativeownspawnmulti-packagereact posedescriptionboundECMAScript 2017querysharedarraybufferassertsrdscolumnpositivespinnerentriestestingreact-hooksstoragegatewayawslinkgroupestreeESArray.prototype.includespnpm9formattingeast-asian-widthfull-widthFloat32Arrayrfc4122walktypaniontransportECMAScript 2018Pushuser-streamscachetouchbeanstalkutilitiesvalidatorArray.prototype.flates5.envnegative zerocode pointshtmlstringifiermanipulationassignFunction.prototype.nameecmascriptECMAScript 3chromiumsource mapendpointRFC-6455gitignorejoinodejsFloat64Arrayreduxes-shimscommanderformatvestmapfeedairbnbfnmatchmkdirpjsxparentsxmlIteratorsearchworkflowcjkansiES2019ECMAScript 2015stylingreducerES2016
3.9.97

10 months ago

3.9.96

10 months ago

3.9.95

10 months ago

3.9.94

11 months ago

3.9.93

11 months ago

3.8.93

11 months ago

3.8.92

11 months ago

3.8.91

11 months ago

3.8.90

11 months ago

3.8.89

11 months ago

3.8.88

11 months ago

3.8.87

11 months ago

3.8.86

11 months ago

3.8.85

11 months ago

3.8.84

11 months ago

3.8.83

11 months ago

3.7.83

11 months ago

3.7.82

11 months ago

3.7.81

11 months ago

3.6.81

11 months ago

3.5.81

11 months ago

3.5.80

11 months ago

3.5.79

11 months ago

3.5.78

11 months ago

3.5.77

11 months ago

3.5.76

11 months ago

3.5.75

11 months ago

3.5.74

11 months ago

3.5.73

11 months ago

3.5.72

11 months ago

3.5.71

11 months ago

3.5.70

11 months ago

3.5.69

11 months ago

3.5.68

12 months ago

3.5.67

12 months ago

3.4.67

12 months ago

3.4.66

12 months ago

3.4.65

12 months ago

3.4.64

12 months ago

3.4.63

12 months ago

3.4.62

12 months ago

2.4.62

12 months ago

2.4.61

12 months ago

2.4.60

12 months ago

2.4.59

12 months ago

2.4.58

12 months ago

2.4.57

12 months ago

2.4.56

12 months ago

2.4.55

12 months ago

2.4.54

12 months ago

2.4.53

12 months ago

2.4.52

12 months ago

2.4.51

12 months ago

1.4.51

1 year ago

1.4.50

1 year ago

1.4.49

1 year ago

1.4.48

1 year ago

1.4.47

1 year ago

1.4.46

1 year ago

1.4.45

1 year ago

1.4.44

1 year ago

1.4.43

1 year ago

1.4.42

1 year ago

1.4.41

1 year ago

1.4.40

1 year ago

1.4.39

1 year ago

1.3.39

1 year ago

1.3.38

1 year ago

1.3.37

1 year ago

1.3.36

1 year ago

1.3.35

1 year ago

1.3.34

1 year ago

1.3.33

1 year ago

1.3.32

1 year ago

1.3.31

1 year ago

1.3.30

1 year ago

1.3.29

1 year ago

1.3.28

1 year ago

1.3.27

1 year ago

1.3.26

1 year ago

1.3.25

1 year ago

1.3.24

1 year ago

1.3.23

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.3.18

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago