7.8.97 • Published 1 year ago

@diotoborg/aliquid-non v7.8.97

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

@diotoborg/aliquid-non Version Badge

github actions coverage License Downloads

npm badge

Is this value a JS DataView? This module works cross-realm/iframe, does not depend on instanceof or mutable properties, and despite ES6 Symbol.toStringTag.

Example

var isDataView = require('@diotoborg/aliquid-non');
var assert = require('assert');

assert.equal(false, isDataView(undefined));
assert.equal(false, isDataView(null));
assert.equal(false, isDataView(false));
assert.equal(false, isDataView(true));
assert.equal(false, isDataView([]));
assert.equal(false, isDataView({}));
assert.equal(false, isDataView(/a/g));
assert.equal(false, isDataView(new RegExp('a', 'g')));
assert.equal(false, isDataView(new Date()));
assert.equal(false, isDataView(42));
assert.equal(false, isDataView(NaN));
assert.equal(false, isDataView(Infinity));
assert.equal(false, isDataView(new Number(42)));
assert.equal(false, isDataView('foo'));
assert.equal(false, isDataView(Object('foo')));
assert.equal(false, isDataView(function () {}));
assert.equal(false, isDataView(function* () {}));
assert.equal(false, isDataView(x => x * x));
assert.equal(false, isDataView([]));
assert.equal(false, isDataView(new Int8Array()));
assert.equal(false, isDataView(new Uint8Array()));
assert.equal(false, isDataView(new Uint8ClampedArray()));
assert.equal(false, isDataView(new Int16Array()));
assert.equal(false, isDataView(new Uint16Array()));
assert.equal(false, isDataView(new Int32Array()));
assert.equal(false, isDataView(new Uint32Array()));
assert.equal(false, isDataView(new Float32Array()));
assert.equal(false, isDataView(new Float64Array()));
assert.equal(false, isDataView(new BigInt64Array()));
assert.equal(false, isDataView(new BigUint64Array()));

assert.ok(isDataView(new DataView(new ArrayBuffer(0))));

Tests

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

selferrorsortpreserve-symlinksreadablestreamsettingstraverseemrprotobufspringreduceStreamelbslicein[[Prototype]]superagentUint8ClampedArraysuperstructtypedarraystableES7Pusherror-handlingajvsigtermpasswordbannerpruneyamlfunctionseventDispatchercolorssyntaxflagenvironmentcompile lessarktypeUint8Arrayfantasy-landclonecloudfrontlazyviewInt16ArrayWeakSetbrowserslistes2016reduxequalitystringifierflatMapmockinggetoptes2017storagegatewayvisualenumerableES2023symbolTypedArraytesterstatea11ypathcloudtrailformatnopeclassnameargscensorUint32ArraywafuninstallECMAScriptcall-boundequaleslintpluginwindowwaapigetintrinsicsetImmediateuploadfunctiondom-testing-librarycore-js$.extendfast-copystylesbusycoerciblecss nestingjson-schema-validatorvariables in cssgitignoreECMAScript 2016clientarraysSetCSStypescriptArrayBufferajaxphonejsxhotbyteLengthserializerutilmkdirs6to5outputbindconsumesymbolsmatchAlljsloadbalancingbintrimObject.definePropertyqueueMicrotaskrdsfnmatchmodulerequireconcatentriesvpctakeimmervalidatettysidecodeszeroboundpropreal-timeString.prototype.matchAlles8touchruntimeoperating-systemhasOwnPropertytypesbrowserkeysObservablesmock256libphonenumberjavascriptwritablees5walkvaluesjsdomWebSocketinstallertransportqsWebSocketsSymbolcolumnspushchineseglobal objectpatchES2017IteratorES3astObject.getPrototypeOfbundlerforEachcommandregular-expressioncrypthttpfigletArray.prototype.flatresolvejsonReactiveX.envregularfpspinnerses-shimsdirectorytoolscacheassertsconfigurablecomparecryptotoArraylockfilees-abstractminimal__proto__json-schemaObject.is.gitignoredeterministicObject.fromEntrieswriteECMAScript 5safevargetOwnPropertyDescriptorgesturestrimStartcontainsmomentWeakMaptsexpressramdapackagesquotelruserializeelmregular expressionvaliddeepbabelcss variabletermfastdependency managerlastformattingcallbindfromconcatMaparraybufferECMAScript 2015findfixed-widthowntddBigUint64Arrayhashlocallessrangeerrortostringtaguser-streamsmatchesaccessordatestringprivate datapromisedescriptordeep-copyrapidvarsshamutilsless cssworkflowtslibreplayautoprefixerECMAScript 2022exit-codenegative zerogetterslotsymlinkdropprotocol-buffersbeanstalkdatastructurecollectionhelpersimmutablegdprreact-componentredux-toolkites6buffersregexpObservablewhichMicrosoftpyyamlinternalcssmake dirlintStreamsfull-widthfile systemexecES2019ECMAScript 2019jwtcolumncomputed-typesimportexportprocesskinesistypedarrayslocationYAMLutilitieselectroncommand-linepropertyweaksetdescriptionjson-schema-validationanimationcss lessinterruptsunicodeECMAScript 3specTypeBoxflattenmkdirpproxyES2022clifilextermmapreusedeep-cloneagentstyleguideclassesrgbbrowserlistsignalprivatemobilefunctionalUint16ArraydeepcopycolorURLSearchParamsmakeestreeio-tsutil.inspecttypeerrorgradients csswidthautoscalingArrayBuffer#sliceshebangsigintenvforkiteratediffPromiseReflect.getPrototypeOfES2018npmzodFunction.prototype.namestyleeast-asian-widthpluginescapeprettyindicatortoSortedsequenceextrapostcss-pluginfscurles7fluxawsvestsharedhasOwngetPrototypeOftranspiler_.extendbuffermkdirframercallbacksignalshookformserverlesscssstylingSymbol.toStringTagharmonyencryptionpackage.jsonasciiflagsoptimizerObject.entriesObjectsubprocessfullwidthsymlinkses2018ESnextairbnbRxJSRFC-6455elasticachedragfpsendersetPrototypeOfjapanesetc39ESonceconstl10niamhttpsArray.prototype.filterbootstrap less3d@@toStringTagprogresstypanionmoveloadingpinoinferencedomtestObject.keysloggerdataviewredactpredictablegetcharactersortedexecutesqshandlerfast-deep-copygroupBypersistentes-shim APIes2015prefixchildglobalsinputschemachecksharedarraybuffercompilerefficienttypeofconsoleloggingperformantfilterhasjsdiffreadablearraytoolkitreactArray.prototype.flattenlistenersES5curriedwaitposecjkES2020weakmappicomatchquerystringvalueECMAScript 2021terminalcall-bindinvarianttrimRightthreeponyfillinspectcloudwatchstreamschaicopyfindLastIndexclassnamesutilityeverystringifyirqgraphqlliveECMAScript 2020fetchscheme-validationcolourfindLastshimnamedeepcloneeffect-tsacornmergeecmascriptformfastcopyjoiexpressionshrinkwrap-0jsonschemadayjsES8bootstrap cssspawnchannelsignedES6queuedescriptorscallconfigoptimistenvironmentsxhriterationwhatwgdynamodbArrayBuffer.prototype.slicemanagerignoredatastylesheettelephoneapiendpointform-validationi18nreact animationwgethooksECMAScript 2018validatorfast-cloneES2016nested csstoStringTagprotosomehardlinks0binarycertificatesincludesextendSystem.globalArray.prototype.findLastIndexperformancespeedpoint-freeReactiveExtensionsnodestyled-componentsreact poseglobal this valueescollection.es6postcsstestingargumenttacitserviceassertionvalidationidentifierseslintconfigbabel-coretoobjectawesomesauceECMAScript 6TypeScriptreact-hook-formtyped arraywindowsassertreducerObject.assignhas-owntrimLeftoffsets3HyBiaccessibilityES2015Int32Arrayansiparsernodejssyntaxerrorworkeryupec2
7.8.97

1 year ago

7.8.96

1 year ago

7.8.95

1 year ago

7.8.94

1 year ago

7.8.93

1 year ago

7.8.92

1 year ago

7.8.91

1 year ago

7.8.90

1 year ago

7.8.89

1 year ago

7.8.88

1 year ago

7.7.88

1 year ago

7.7.87

1 year ago

7.7.86

1 year ago

7.7.85

1 year ago

7.7.84

1 year ago

7.7.83

1 year ago

7.7.82

1 year ago

7.7.81

1 year ago

7.7.80

1 year ago

6.7.80

1 year ago

6.7.79

1 year ago

6.7.78

1 year ago

6.7.77

1 year ago

6.7.76

1 year ago

5.7.76

1 year ago

5.7.75

1 year ago

5.7.74

1 year ago

5.7.73

1 year ago

5.7.72

1 year ago

5.7.71

1 year ago

5.6.71

1 year ago

5.6.70

1 year ago

5.6.69

1 year ago

5.6.68

1 year ago

5.6.67

1 year ago

5.6.66

1 year ago

5.6.65

1 year ago

4.6.65

1 year ago

4.6.64

1 year ago

4.6.63

1 year ago

3.6.63

1 year ago

3.6.62

1 year ago

3.6.61

1 year ago

3.6.60

1 year ago

3.5.60

1 year ago

3.5.59

1 year ago

3.5.58

1 year ago

3.5.57

1 year ago

3.5.56

1 year ago

3.5.55

1 year ago

3.5.54

1 year ago

3.5.53

1 year ago

3.5.52

1 year ago

3.5.51

1 year ago

3.5.50

1 year ago

3.5.49

1 year ago

3.5.48

1 year ago

3.5.47

1 year ago

3.5.46

1 year ago

3.5.45

1 year ago

3.5.44

1 year ago

3.5.43

1 year ago

3.5.42

1 year ago

3.5.41

1 year ago

3.5.40

1 year ago

3.5.39

1 year ago

3.5.38

1 year ago

3.5.37

1 year ago

3.4.37

1 year ago

3.4.36

1 year ago

3.4.35

1 year ago

3.3.35

1 year ago

3.3.34

1 year ago

3.3.33

1 year ago

3.3.32

1 year ago

3.3.31

1 year ago

3.3.30

1 year ago

3.3.29

1 year ago

3.3.28

1 year ago

3.3.27

1 year ago

3.3.26

1 year ago

3.3.25

1 year ago

3.3.24

1 year ago

3.2.24

1 year ago

3.2.23

1 year ago

3.2.22

1 year ago

3.2.21

1 year ago

3.2.20

1 year ago

3.2.19

1 year ago

3.2.18

1 year ago

3.2.17

1 year ago

2.2.17

1 year ago

2.2.16

1 year ago

2.2.15

1 year ago

2.2.14

1 year ago

2.2.13

1 year ago

2.2.12

1 year ago

2.2.11

1 year ago

2.2.10

1 year ago

2.2.9

1 year ago

2.2.8

1 year ago

2.2.7

1 year ago

2.2.6

1 year ago

2.2.5

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago