4.10.96 • Published 10 months ago

@swenkerorg/molestiae-et v4.10.96

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

@swenkerorg/molestiae-et Version Badge

dependency status dev dependency status License Downloads

npm badge

Robustly get the length of a Typed Array, or false if it is not a Typed Array. Works cross-realm, in every engine, even if the length property is overridden.

Example

var typedArrayLength = require('@swenkerorg/molestiae-et');
var assert = require('assert');

assert.equal(false, typedArrayLength(undefined));
assert.equal(false, typedArrayLength(null));
assert.equal(false, typedArrayLength(false));
assert.equal(false, typedArrayLength(true));
assert.equal(false, typedArrayLength([]));
assert.equal(false, typedArrayLength({}));
assert.equal(false, typedArrayLength(/a/g));
assert.equal(false, typedArrayLength(new RegExp('a', 'g')));
assert.equal(false, typedArrayLength(new Date()));
assert.equal(false, typedArrayLength(42));
assert.equal(false, typedArrayLength(NaN));
assert.equal(false, typedArrayLength(Infinity));
assert.equal(false, typedArrayLength(new Number(42)));
assert.equal(false, typedArrayLength('foo'));
assert.equal(false, typedArrayLength(Object('foo')));
assert.equal(false, typedArrayLength(function () {}));
assert.equal(false, typedArrayLength(function* () {}));
assert.equal(false, typedArrayLength(x => x * x));
assert.equal(false, typedArrayLength([]));

assert.equal(1, typedArrayLength(new Int8Array(1)));
assert.equal(2, typedArrayLength(new Uint8Array(2)));
assert.equal(3, typedArrayLength(new Uint8ClampedArray(3)));
assert.equal(4, typedArrayLength(new Int16Array(4)));
assert.equal(5, typedArrayLength(new Uint16Array(5)));
assert.equal(6, typedArrayLength(new Int32Array(6)));
assert.equal(7, typedArrayLength(new Uint32Array(7)));
assert.equal(8, typedArrayLength(new Float32Array(8)));
assert.equal(9, typedArrayLength(new Float64Array(9)));
assert.equal(10, typedArrayLength(new BigInt64Array(10)));
assert.equal(11, typedArrayLength(new BigUint64Array(11)));

Tests

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

Object.isrestfuluser-streamscallbackdotenvObject.assignupoptimizermkdirsgroupbanneres-shimsnamephonefast-deep-clonexmlsnsincludescharactersmkdirpchairdseveryreadglacierflattslibinspectdataforEachcomputed-typesajvglobutilsminimalsimpledbjsdomisConcatSpreadablehasOwnPropertytypanionfront-endbusyrss0writematchloges2017.gitignoretesterfastclonetacitjapaneseECMAScript 2017postcsstoReversedmapreducelookpushhelperfindupproxyparseECMAScript 2016patchgetOwnPropertyDescriptoravaconsolesinatraswfES6ECMAScript 2015loadingESrm -rfsimple cacheicues5comparenativetypeerrorObjectprivatechildmanagerwaitmomentObservablestypekey parcachebddinferencenodeio-tsdayjslook-upieArray.prototype.flathtmlmodulebufferclassesi18nautoprefixerworkflowcryptoUint8ClampedArrayemrmodulesTypeBoxefficientECMAScript 2020cliloggingserializationtrimprivate dataclass-validatorcharsetcolorshas-ownfindLasthookskarmagenericsimportexportexpressionschemepyyamlutilityonceMicrosoftprunepropertiesdefinesqsshebangloggerinstall[[Prototype]]core-jscloudtrailArrayBuffer#slicerfc4122guidcurlutil.inspectinvariantcommand-lineeslibphonenumberes-abstractcallboundflatMapMaphandlerECMAScript 7reduceruninstallformatbrowserlistjasminefast-copypromiselockfileoptimistArrayBufferES2020find-upcode pointsdeep-copyeventsomitdiffrulescircularredirecttypedarrayfixed-widthworkspace:*URLSearchParamsexecwalkingObservableregular expressionStreamWeakSetnodejsconcatMapexpresssetterstyled-componentspositivedebugES2015dataViewcloudsearchebsresolveaccessibilitytoStringTagbundlingformattingUnderscorecall-bind_.extendgettertermcommanderutil@@toStringTagform-validationtrimStarturlspawnStyleSheetajaxiteratornpmignoretransportyupescapefilterpoint-freecheckenvironmentsES2017Int8ArraysorteddragprocessArraydependenciesArray.prototype.flatMapcoveragetrimEndnpmtoArrayobjkey valueYAMLeast-asian-widthpackage managerstylingelasticachequerynamescloudwatchserializequeuebindECMAScript 2022symlinksjshintWeakMaptoolkitlintartatomfastCSSStyleDeclarationinputES2019espreebrowseramazonrouterroute53monorepotraverseconsumetc39Object.definePropertyargvmochaeffect-tspluginkeyenvasserteslint-pluginposeformscopyhigher-orderzxreversedECMAScript 3linkwidthgetPrototypeOfhashvalidObject.fromEntrieseslintkeyswhatwgtouchSetboundidzodpreprocessorcharacternegative zerodescriptorslastgraphqlreduxapollopathtypesvalidaterm -frfolderlanguageHyBisetPrototypeOferrornegativeeventEmitterfastifyjsdiffexecfilecallservicetimedynamodb256ECMAScript 2019redux-toolkitsetImmediatedeepclonemulti-packageJSONsyntaxxtermclassnamesbytehttpsdirbuffersvalidationtypesafethreeperformanceconfigurablenopebinaryconcatsearchgitignoretoSortedinternalRegExp#flagsconverttoobjecttoolsfunctiones2018entriessortgetes-shim APIworkerInt16Arrayformimmutabledropoffsetfast-clone.envtapschemaroutingparserbrowserslistassertionfeedtypeofslotcall-boundPromisereverseutilitiesReactiveXWebSocketsfetchstylesRxvariablesapies2016Array.prototype.includescoerciblesliceagentawesomesaucefileroutejsonregularObject.valuesflattenvaluePushserverjsxsesECMAScript 6ttyistanbultakequerystringsharedWebSocketcssvisualwafRFC-6455popmotionwarningES7AsyncIteratorTypeScriptincss-in-jsrapidfnmatchsetfromsameValueZeroArray.prototype.filterfile cachewgethelperses6outputstablemake dirdeepcopyinstrumentationcolumncreatestylesomearrayscolormatchestextindicatoriamprototypeeventDispatcherclientprogressrmbyteLengthxhrtrimLeftfpschromiumcollection.es6regular-expressionqsbundler
4.10.96

10 months ago

4.10.95

10 months ago

4.10.94

10 months ago

4.10.93

10 months ago

4.10.92

10 months ago

3.10.92

11 months ago

3.10.91

11 months ago

3.10.90

11 months ago

3.10.89

11 months ago

3.10.88

11 months ago

3.9.88

11 months ago

3.9.87

11 months ago

3.9.86

11 months ago

3.9.85

11 months ago

3.9.84

11 months ago

3.9.83

11 months ago

3.8.83

11 months ago

3.8.82

11 months ago

3.8.81

11 months ago

3.8.80

11 months ago

3.8.79

11 months ago

3.8.78

11 months ago

3.8.77

11 months ago

3.7.77

11 months ago

3.7.76

11 months ago

3.7.75

11 months ago

3.7.74

11 months ago

3.7.73

11 months ago

3.7.72

11 months ago

3.7.71

11 months ago

3.6.71

11 months ago

3.6.70

11 months ago

3.5.70

11 months ago

3.5.69

11 months ago

3.5.68

11 months ago

3.5.67

12 months ago

3.5.66

12 months ago

3.5.65

12 months ago

3.5.64

12 months ago

3.5.63

12 months ago

3.5.62

12 months ago

2.5.62

12 months ago

2.5.61

12 months ago

2.5.60

12 months ago

2.5.59

12 months ago

1.5.59

12 months ago

1.5.58

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

12 months ago

1.4.51

12 months 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.3.44

1 year ago

1.3.43

1 year ago

1.3.42

1 year ago

1.3.41

1 year ago

1.3.40

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

1 year ago

1.2.30

1 year ago

1.2.29

1 year ago

1.2.28

1 year ago

1.2.27

1 year ago

1.2.26

1 year ago

1.2.25

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