4.9.97 • Published 2 years ago

@diotoborg/non-hic-magnam v4.9.97

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@diotoborg/non-hic-magnam 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('@diotoborg/non-hic-magnam');
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

flattenexectoolkitextramodulefixed-widthlistenersprefixvaluesinspectchromesiginteffect-tsguidslicemergecensorvalidatebddprotoreact-hooksdatastructurematchAllobjectES2019package managerspawnglacierWebSocketexpressiondefinemobilenodejses6Streamsjestless mixinsdescriptionspecpathstatelesschannelbinariesenvTypedArraybabel$.extendsignedexecfilewgetcloudformationtrimEndsnsspeeddescriptorsimmerclass-validatorpreprocessorlruefficientgetterbyteOffsetswfArraytddlastapollosortedSymbol.toStringTagtrimRightdateiamdirectorymomenttoStringTagslotfindLastObject.assignassignvalidgroupBystylesheet[[Prototype]]acornsuperstructfastcopycss nestinglessdeletegetshrinkwrapfastlivepropertyperformanceUint8ArrayjsdomastapiirqUint32ArrayReflect.getPrototypeOfes8reverseRegExp.prototype.flagsfromshebangprocessObjectremovereversedcommand-linesyntaxcompile lessloggingpyyamlnamecallbindimmutablewaf-0statusES2015queuelockfileInt8ArraywalkfullwidthmkdirmatchURLSearchParamsroutewritablehookformhashArrayBuffer#sliceStreamObject.definePropertyajaxtoSortedtextsigtermreact-hook-formprototypegetOwnPropertyDescriptorRxJSttyparsingenderisConcatSpreadabletypeofencryptionclasseses-shim APIsuperagentnumberuser-streamstacitreact animationpushwaapifslibphonenumberCSSStyleDeclarationemrpatchflatoptimistdefinePropertyES2021form-validationchromiuminferencerandomarktypeObject.getPrototypeOfUint8ClampedArraybusybyteLengtheventEmittersymlinkeverykinesisECMAScript 7globgdprimportfpsArray.prototype.flatMapArray.prototype.filterrangeerrores2017emitArray.prototype.containsexecutechaicomputed-typeswindowspnpm9argvfunction.lengthtoArrayextendcurlmkdirpboundes2015callboundES2016oncenpmignoreloadbalancingmonorepostreamstypaniondependenciesnativeargumentletpredictablei18ninscheme-validationxhrdependency managerhasprivate datautilrobustsharedarraybuffersesCSStrimfind_.extenderror-handlingtoobjectdom-testing-libraryECMAScript 3ES2020interrupts3dcontainsECMAScript 2015installfindLastIndexECMAScript 2020checktypedfast-deep-copyaccessortranspilersharednodecolumnsES2023cloudfrontiemapstyled-componentsHyBicachearraysreducebannerbuffersReactiveExtensionschildsortminimalhigher-orderyamlrfc4122coerciblePromiseArrayBuffer.prototype.slicegetintrinsicshellcss-in-jscss variablecollection.es6Function.prototype.namecorees-shimstelephoneRegExp#flagsruntimeprivateinternal slotflagsendpointinputredux-toolkitcompilerserializationcolumnoffsetflatMapsignalsdeepclonefastifyES3functionspringstarternameshttpsmixinsfluxreactwindowreact posecloudtrailzxdescriptorbrowserslistes2016a11yreducersyntaxerrortransportcoloursettingsredactrulesiteratorcloneserializeStyleSheetartinvariantforEachmulti-packagereadassertscjkmetadatastyleguidegetPrototypeOfcolordiffjson-schema-validationtypedarrayviewglobal objectpolyfillECMAScript 2017timeserializerargsutilitiesformattingglobalssubprocessMapPushworkerjsxprogressregular expressionrgbtoReversedArray.prototype.flatclassnamesiterationpreserve-symlinkswidthpopmotionhas-ownstringjshinttestingnopetoolsBigUint64ArrayassertmapreduceES2017Uint16ArrayjQueryTypeScriptInt16ArrayReactiveXJSONeventsstate__proto__URLbytecircularpasswordframeruuiditerategesturescall-boundoutputloggertostringtagwriteimportexportcreateregular-expressionrequestdircryptassertionresolveequalitySetintrinsicdotenvreact-componentwhichdeep-copyhttpconfigurableWebSocketstraversetc39asyncauthenticationspinnerbundlerObject.valuesconsumeasciicommandECMAScript 2019esglobal this valueurldeepcopystylinglengthcallbackjwtcloudwatchisgetoptfigletformatfunctionalpackage.jsonwait@@toStringTagvalidationgenericsformsglobalThisFloat32ArrayconcatMapbootstrap less.envconcatdeeprecursivefast-clonepostcssstylesfullweaksetdeterministicforkyupbinmkdirseslintsafevariablescliJSON-SchemaenvironmentstermES2018gradients css3parseridletsreadablesetlanguagefile systemselfconstroute530typescriptcolorsramdafast-copylocalflaggitignorevartouchoptimizererrordragschemabcryptjsdiffmacoscryptoArrayBufferponyfillzerojstypesidepropertiesless cssfilterjsonschemaObject.isenumerableopenssllinkWeakSetcall-bindcliententriesestreecss lesshelperreal-timeamazonelbarraybufferoptionlinux256streamdayjsstringifiersequencechineseprettyvisuales-abstractebskeyquerynpmcsscertificatesrequireArray.prototype.findLastautoscalingTypeBoxglobalinternalterminalpureES2022elmphonesymlinksfastclonedomlazyuninstallawspinoincludeseslintconfigInt32ArraydatathreeomitmruvpcenvironmentdataViewbindpositivestructuredCloneES6symbolsES8core-jspoint-freeconfigansipromisees2018protobuftranspileObservableUnderscorecommandermanagerjson-schemahooksprunereadablestreamwarningpostcss-plugintypesqueueMicrotasksetterecmascriptharmonynegative zeroES5shamformfast-deep-clonevalidatorbuffercloudsearchhandlerspropvariables in cssshimlesscss6to5ECMAScript 2016hotequalawesomesauceasterisksECMAScript 2021rfc9562lintESnexthelpersspinnerspersistentString.prototype.trimregularmakeelectroncodesfantasy-landgroupYAMLjsoneslintpluginignorelogstablewhatwges5operating-systemObject.keysplugintrimLeftBigInt64Arraydeep-clonecharacterObservablestesterfetch.gitignorejapanesesignalrdsexpressgraphqlunicodestoragegatewayajvnegativevarssimpledbRxhasOwnweakmapbinarybundlingString.prototype.matchAllArray.prototype.findLastIndexxtermutil.inspectkoreanzodschemeArray.prototype.includesproxydataviewregexpownauthkeyssqsreact-testing-libraryaccessibilityjoiECMAScript 6l10nESes7MicrosoftbrowserlistmodulescollectionObject.fromEntriesdropeventDispatcherfunctionsexitfphasOwnPropertyairbnbfiletypeerrorES7picomatchutilityec2protocol-buffersWeakMapvestECMAScriptstringify
4.9.97

2 years ago

4.9.96

2 years ago

4.9.95

2 years ago

4.9.94

2 years ago

4.9.93

2 years ago

4.9.92

2 years ago

4.9.91

2 years ago

4.9.90

2 years ago

4.9.89

2 years ago

4.9.88

2 years ago

4.9.87

2 years ago

4.9.86

2 years ago

4.9.85

2 years ago

4.9.84

2 years ago

4.9.83

2 years ago

4.9.82

2 years ago

4.9.81

2 years ago

4.9.80

2 years ago

4.9.79

2 years ago

4.9.78

2 years ago

4.9.77

2 years ago

4.9.76

2 years ago

4.9.75

2 years ago

4.8.75

2 years ago

4.8.74

2 years ago

4.8.73

2 years ago

4.8.72

2 years ago

4.8.71

2 years ago

4.8.70

2 years ago

4.7.70

2 years ago

4.6.70

2 years ago

3.6.70

2 years ago

3.6.69

2 years ago

3.6.68

2 years ago

3.6.67

2 years ago

3.6.66

2 years ago

3.6.65

2 years ago

3.6.64

2 years ago

3.6.63

2 years ago

3.6.62

2 years ago

3.5.62

2 years ago

3.5.61

2 years ago

3.5.60

2 years ago

3.5.59

2 years ago

3.5.58

2 years ago

3.5.57

2 years ago

3.5.56

2 years ago

3.5.55

2 years ago

3.5.54

2 years ago

3.5.53

2 years ago

3.5.52

2 years ago

3.4.52

2 years ago

3.4.51

2 years ago

3.4.50

2 years ago

3.4.49

2 years ago

3.4.48

2 years ago

3.4.47

2 years ago

3.4.46

2 years ago

3.4.45

2 years ago

3.4.44

2 years ago

3.4.43

2 years ago

3.4.42

2 years ago

3.3.42

2 years ago

2.3.42

2 years ago

2.3.41

2 years ago

2.3.40

2 years ago

2.2.40

2 years ago

2.2.39

2 years ago

1.2.39

2 years ago

1.1.39

2 years ago

1.1.38

2 years ago

1.1.37

2 years ago

1.1.36

2 years ago

1.1.35

2 years ago

1.1.34

2 years ago

1.1.33

2 years ago

1.1.32

2 years ago

1.1.31

2 years ago

1.1.30

2 years ago

1.1.29

2 years ago

1.1.28

2 years ago

1.1.27

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago