3.15.94 • Published 10 months ago

@erboladaiorg/inventore-minus v3.15.94

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

@erboladaiorg/inventore-minus 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('@erboladaiorg/inventore-minus');
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

joibeanstalkregular expressionstsmonorepoimportsliceprettyfixed-widthconcatMapendpointregular-expressionchannelroute53manipulationcoresymlinksjshintconsumeperformantwaapiperformanceconstbrowserlistinHyBihashObservablesrequiregesturesBigInt64Arrayes6fastifyObservablelet256iameventDispatcherbusyObject.getPrototypeOfFloat64Arrayfast-copyboundautoscalingchinesetypescriptcolourutilsECMAScript 5invariantregular expressionjsonschemal10ncalljsonramdareact-hook-formdeep-clonepyyamlfindLastIndexinstrumentationmatchesrobustprotocol-buffersArray.prototype.findLastIndexnodestylerecursivelockfileECMAScript 7mapreducecallbindsideimportexportdiffreversedback-endcallbackmake dirposeUnderscoregetterPushruntimeWeakMapSetcharacterexecbabelsesES2020upwaffolderserializespawnes8ievarutilanimationdescriptorssqsredactfastcopynpmignoretranspileYAMLvpcurlexpression_.extendarraybufferstylingRFC-6455jsdominferencerm -rfmetadatapolyfill0RxJSasyncWebSocketfnmatchoptionESnextgenericsCSSStyleDeclarationshimstyled-componentsfast-clonergbemojiassertionforkReflect.getPrototypeOfformoutputdeeparraysjapaneseflagsremoveFunction.prototype.nameamazonECMAScript 2016storagegatewaypropertieswidthignoreString.prototype.trimArrayBuffer.prototype.slicegraphqlroutingECMAScript 2019definePropertypipeECMAScript 2023columntelephoneframeworkES5structuredCloneobjectextratouchhookscontainsec2readablestreamvariablessubprocessjson-schema-validationES7matchAllutilitiesincludesgitignoreuninstallcommand-lineenderpackage.jsonansitypanionsyntaxacornWebSocketsbinaryttyObject.valuesthreetypesextendcoverageavaloadbalancingtextnegativechecks3String.prototype.matchAllviewcolorwhichmakevalidationfeedprefixsharedarraybufferreadspinnerpostcss-plugintermcloneelectronmatches2018queueMicrotaskECMAScript 2017ECMAScript 2015Streamcall-boundformattingclientpropES2019dataviewfile systemUint32ArraysetterstylesdescriptoriteratorisConcatSpreadableeventEmitterfullRegExp#flagsrangeerrorCSSstreambuffersmkdirconfigES2015binawesomesauceqsform-validationES8zodreact poseassigntoArrayredux-toolkitjsfantasy-landjsdiffes-shim APIfullwidthkoreanarrayqueryObject.isbannerinspectrmBigUint64ArraywhatwgdomappflatMapcurlreact-testing-librarybyteOffsetnegative zerofigletrmdircodesbytetc39searchequalitychildstarterfunctionseslint-pluginTypedArrayes2016dynamodbfunctionES2016installtacitcore-jspnpm9airbnbestreegroupByMapschemetapequoteenumerablesharedenvchaigroupspecservicewarningRegExp.prototype.flagsistanbulvisualentriesES2018csscallboundprogresstapReactiveXObject.fromEntriesgetnametoReversedeveryeslinteslintpluginreal-timelookcloudwatchcolumnsslotkeysbyteLengthdescriptionhardlinkssorteddatestringifierObject.keystimeemitelasticachemoduleswalkingtoobjectatomxhreventsdebuges2015$.extendsortshellbindpuretoStringTagUint16ArrayIteratorES6randomsafetrimEndArray.prototype.filterastweaksetspeeddatareduxserializerhas-owncircularespreecompilercoerciblemruhigher-orderbrowserslistscheme-validationstyleguideprocessbuffernativesuperstructsuperagentasteriskscomparefinduuidmergees-abstractrequest3dnamesfpawspropertyURLdirexecfilefindupStyleSheetstringifylocalesfast-deep-copytdddeep-copyformatparserTypeScriptfromlrudayjsswftypeofserveromitsetImmediateshebangnumberwritablecopytrimRightlook-upartpositivearktypeponyfillfsdom-testing-libraryuser-streamsnodejs@@toStringTagsyntaxerrorjson-schemaglobalsbundlingrsssetPrototypeOfURLSearchParamsqueueweakmaptypeerrorlengthpreprocessormockunicoderegularzxstableESaccessorpoint-freedataViewObjecteffect-tsio-tsglobshrinkwrapvaluelocationReactiveExtensionsreadablehasOwnworkergetOwnPropertyDescriptorerrorregexptypedarrayjQuerywaitsomeimmutableindicatorWeakSetequalprotologgerconcattoSortedES2021languageloggingdragrestfulreverseformspushsameValueZerovaluescensortslibdeterministicInt8ArraystringES3writeSymbolInt16ArrayargvapollochromiumredirectMicrosoftownsymbolsoffsetmomentfull-widthArray.prototype.containshasOwnPropertyclassnamesinternalsettingsrm -frprototypeproxycjkimmertranspileres5css-in-jses2017source maptestArrayBuffer#sliceideslintconfigjson-schema-validatorObject.entriesprunereducefpstrimLeftfunction.lengthES2017picomatchlibphonenumberECMAScript 3symbolStreamsmap
3.15.94

10 months ago

3.15.93

10 months ago

3.15.92

10 months ago

3.15.91

10 months ago

3.15.90

10 months ago

3.15.89

11 months ago

3.15.88

11 months ago

3.15.87

11 months ago

3.15.86

11 months ago

3.15.85

11 months ago

3.15.84

11 months ago

3.15.83

11 months ago

3.15.82

11 months ago

3.15.81

11 months ago

3.15.80

11 months ago

3.15.79

11 months ago

3.15.78

11 months ago

3.15.77

11 months ago

3.14.77

11 months ago

3.14.76

11 months ago

3.14.75

11 months ago

3.13.75

11 months ago

3.13.74

11 months ago

3.13.73

11 months ago

2.13.73

11 months ago

2.12.73

11 months ago

2.12.72

11 months ago

2.12.71

11 months ago

2.12.70

11 months ago

2.12.69

11 months ago

2.12.68

11 months ago

2.11.68

11 months ago

2.11.67

11 months ago

1.11.67

11 months ago

1.10.67

11 months ago

1.10.66

12 months ago

1.9.66

12 months ago

1.9.65

12 months ago

1.8.65

12 months ago

1.8.64

12 months ago

1.8.63

12 months ago

1.8.62

12 months ago

1.8.61

12 months ago

1.8.60

12 months ago

1.8.59

12 months ago

1.8.58

12 months ago

1.8.57

12 months ago

1.8.56

12 months ago

1.7.56

12 months ago

1.6.56

12 months ago

1.6.55

12 months ago

1.6.54

12 months ago

1.6.53

12 months ago

1.6.52

12 months ago

1.6.51

12 months ago

1.6.50

1 year ago

1.6.49

1 year ago

1.6.48

1 year ago

1.6.47

1 year ago

1.6.46

1 year ago

1.6.45

1 year ago

1.6.44

1 year ago

1.6.43

1 year ago

1.6.42

1 year ago

1.6.41

1 year ago

1.6.40

1 year ago

1.5.40

1 year ago

1.5.39

1 year ago

1.5.38

1 year ago

1.5.37

1 year ago

1.5.36

1 year ago

1.5.35

1 year ago

1.5.34

1 year ago

1.4.34

1 year ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.29

1 year ago

1.4.28

1 year ago

1.4.27

1 year ago

1.4.26

1 year ago

1.4.25

1 year ago

1.4.24

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

1 year ago

1.3.16

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

1 year ago

1.1.11

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

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