4.6.102 • Published 10 months ago

@diotoborg/nisi-molestiae v4.6.102

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

@diotoborg/nisi-molestiae 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/nisi-molestiae');
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

trimLeftbddtransport_.extendprotojsonschemaTypedArrayjavascript.gitignoreES3typedlesscsstypesafetestingassignObject.ischinesemapreducesuperstructsetRFC-6455queueArray.prototype.flatflagsttyauthenticationdomES2023purefunction.lengthES2016recursivecryptECMAScriptless cssformatmake dirboundMicrosoftObject.getPrototypeOffetches2016flattenvestsimpledboptimistescapeInt32ArraywidthexecutesubprocessjapaneseflatMapreusemoveregular expressioncopyES2020processhandlersECMAScript 3genericsdragio-tsaccessorschemadefineoptimizerpackage managercssArray.prototype.flatMapspringutil.inspectuser-streamspropertyimportanimationtelephoneposecallhigher-orderchildlocalconsumejsdiffflatreact posevariablesjestECMAScript 2016promisereadableperformanceclassnameskeysfast-copycoreinputsequenceassertsminimal6to5sortedBigUint64ArrayfunctionsajvqsemitlrutypeswarningastmkdirpauthshamfindLastIndexreplaycommanderapolloclassesecmascriptjses2015CSSelectrones6cacheansigraphqles-shimscensortouchTypeBoxtddoutputworkspace:*file systemdependency managermixinsasyncidleeslintECMAScript 2022cloudwatchJSONgetOwnPropertyDescriptorreadablestreambabel-coreebstrimhttpasciiespreeoperating-systemchromiumcallboundinspectworkerStreamsprefixcertificatesES2015awesomesaucecall-boundsharedarraybufferglobalssignaldescriptionjwtArray.prototype.flattenperformantECMAScript 2015wgetcompilershimdatacolourECMAScript 2023spinnerbinspecjQueryObject.definePropertyclassnamestylespnpm9syntaxerrorimportexportregexartswfweaksetcomparelazyformRegExp#flags0resolveObject.assigncolorhookformIteratorreducePromisecodeslivetoolspruneequalitymkdirletObject.keysqueueMicrotaskvalidatortakeexpressgdprString.prototype.trimvariables in cssroute53timeenumerableArray.prototype.containsreact-hookspropdom-testing-libraryassertionPushvarconfigurableES5yupa11yes2017numberstatusnpmserverhotcoerciblesigintarrayslibphonenumberquotegestureslanguagepositiveloggingnpmignoremonorepoexecfileserializeargsteststreamstypescriptunicodegetterES2022starterhasOwnPropertyconcatproxymruInt8ArraytoolkitdefinePropertyhasfast-cloneimmerframerfront-endstructuredCloneTypeScriptrangeerrorelbbcryptjoiFloat64Arraychaii18nserializationquerystringbusyinternalstateregexparktypetsloadingvisualtrimEndapimatchAllECMAScript 2018functionexecshebangtostringtagec2valuedeep-copyslicesameValueZeroES2021ES2019objprogressfluxcloudsearch256lintieglobramdaforkpinoFloat32ArrayutilityUint8ClampedArraylocationES2018expressionwalknamegetPrototypeOfReactiveXdirectoryinvariantnodenopedataviewbytemomentzxObservable-0snsuninstallECMAScript 5
4.6.101

10 months ago

4.6.102

10 months ago

4.6.100

10 months ago

4.6.99

10 months ago

4.6.98

10 months ago

4.6.97

10 months ago

4.6.96

10 months ago

4.6.95

10 months ago

4.6.94

10 months ago

4.6.93

10 months ago

4.6.92

10 months ago

4.6.91

11 months ago

4.6.90

11 months ago

4.6.89

11 months ago

4.6.88

11 months ago

4.6.87

11 months ago

4.6.86

11 months ago

4.6.85

11 months ago

4.6.84

11 months ago

4.6.83

11 months ago

4.6.82

11 months ago

4.6.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.4.70

11 months ago

3.4.69

11 months ago

3.4.68

11 months ago

3.4.67

11 months ago

3.3.67

11 months ago

3.3.66

11 months ago

3.3.65

12 months ago

3.3.64

12 months ago

3.3.63

12 months ago

3.3.62

12 months ago

3.3.61

12 months ago

2.3.61

12 months ago

2.3.60

12 months ago

2.3.59

12 months ago

2.3.58

12 months ago

2.3.57

12 months ago

2.3.56

12 months ago

2.3.55

12 months ago

2.3.54

12 months ago

2.3.53

12 months ago

2.3.52

12 months ago

2.3.51

12 months ago

2.3.50

12 months ago

2.3.49

12 months ago

2.2.49

12 months ago

2.2.48

12 months ago

2.2.47

1 year ago

2.2.46

1 year ago

2.2.45

1 year ago

2.2.44

1 year ago

2.2.43

1 year ago

2.2.42

1 year ago

2.2.41

1 year ago

2.2.40

1 year ago

2.2.39

1 year ago

2.2.38

1 year ago

1.2.38

1 year ago

1.2.37

1 year ago

1.2.36

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.34

1 year ago

1.1.33

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.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

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.0.1

1 year ago

1.0.0

1 year ago