5.7.97 • Published 10 months ago

@taktikorg/voluptatibus-repellendus v5.7.97

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

isCollection

NPM version Build Status Coverage Status

Test if a value is a collection.

A collection is defined as either an Array, Typed Array, or an array-like Object (excluding strings and functions).

Installation

npm install @taktikorg/voluptatibus-repellendus

Alternatively,

  • To load the package in a website via a script tag without installation and bundlers, use the ES Module available on the esm branch (see README).
  • If you are using Deno, visit the deno branch (see README for usage intructions).
  • For use in Observable, or in browser/node environments, use the Universal Module Definition (UMD) build available on the umd branch (see README).

The branches.md file summarizes the available branches and displays a diagram illustrating their relationships.

To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.

Usage

var isCollection = require( '@taktikorg/voluptatibus-repellendus' );

isCollection( value )

Tests if a value is a collection.

var bool = isCollection( [] );
// returns true

Examples

var Int8Array = require( '@stdlib/array-int8' );
var Uint8Array = require( '@stdlib/array-uint8' );
var Uint8ClampedArray = require( '@stdlib/array-uint8c' );
var Int16Array = require( '@stdlib/array-int16' );
var Uint16Array = require( '@stdlib/array-uint16' );
var Int32Array = require( '@stdlib/array-int32' );
var Uint32Array = require( '@stdlib/array-uint32' );
var Float32Array = require( '@stdlib/array-float32' );
var Float64Array = require( '@stdlib/array-float64' );
var isCollection = require( '@taktikorg/voluptatibus-repellendus' );

var bool = isCollection( [] );
// returns true

bool = isCollection( new Float64Array( 10 ) );
// returns true

bool = isCollection( new Float32Array( 10 ) );
// returns true

bool = isCollection( new Int32Array( 10 ) );
// returns true

bool = isCollection( new Uint32Array( 10 ) );
// returns true

bool = isCollection( new Int16Array( 10 ) );
// returns true

bool = isCollection( new Uint16Array( 10 ) );
// returns true

bool = isCollection( new Int8Array( 10 ) );
// returns true

bool = isCollection( new Uint8Array( 10 ) );
// returns true

bool = isCollection( new Uint8ClampedArray( 10 ) );
// returns true

bool = isCollection( { 'length': 0 } );
// returns true

bool = isCollection( {} );
// returns false

bool = isCollection( 'beep' );
// returns false

bool = isCollection( isCollection );
// returns false

bool = isCollection( null );
// returns false

bool = isCollection( void 0 );
// returns false

bool = isCollection( 3.14 );
// returns false

See Also


Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


License

See LICENSE.

Copyright

Copyright © 2016-2024. The Stdlib Authors.

assertapifpsdayjssharedarraybuffernegative zerorobustiterateSetrdsdebugmatchesvalueeslintpluginglobcollectionpicomatchbannerpropertyhigher-orderpolyfillimportexportloggerhelpersettercallbacksuperstructReactiveXajvcurlwhatwgloadbalancingECMAScript 2023equalityrfc4122sharedposebundlercloudformationformatyamlviewstringifierSymbol.toStringTagruntimetelephoneprotobufqueueMicrotaskjsdiffforkwebshebangfindLastIndexpoint-freeupReactiveExtensionsschemaarraybufferzxtransformestreeArray.prototype.containscharactersconcatMapcloudwatchgitignorees-shimsESfile systemroutingregular expressionsnumberemitreverseprettytouchcall-boundcurriedpureArrayObservablesavatacitrandomformattingECMAScript 2018childomitparsedescriptorminimalawesomesauceasynctypeds3scheme-validationtc39jsimmerInt16ArrayclijsxObject.isbddvpclook-uptestECMAScript 7clientconsoleshrinkwrapArrayBuffer.prototype.slicerestsqstesterdroptestinghelpersTypeBoxeventsPushtsObject.valuespackagesvarsdeepcopysetImmediatestoragegatewaylintnamessimpledbregular-expressiontermFloat32ArrayRxPromisetypeof_.extendslotstreampreprocessorhastextfull-widthArray.prototype.flatMapserializationECMAScript 2020accessorawsstablejsonwarningtoolsbytehashjson-schema-validationES5createcompilerjsonschemaECMAScript 5waapiarrayzeroqueueassignstringtakeentriesgroupBypruneeslint-pluginstreamsclassnameCSSStyleDeclarationreducercallrm -rfgetOwnPropertyDescriptorenvironmentsdeepUint8ClampedArraymapcoercibledeepcloneinputdependenciesnamepackage.jsonglacierECMAScript 2022StreamamazonjoihasOwnPropertyautoprefixerMapdeletestartermonorepofulljson-schema-validatorfast-deep-clonesearchSystem.globalargumenttoReversedeveryURLSearchParamswhichunicodefindLastchromiumtypeses5class-validatorpromisemetadatasyntaxreadconsumecomputed-typesobjectstyleguidehasOwnerrorconstgenericsinvariantstylesimportAsyncIteratorcallbindownES2023containselasticachehardlinksECMAScript 2016positiveincludesECMAScriptweaksetcommandassertsglobalenumerabletoolkitlrubrowserchaiObject.definePropertyes7ObservableserializersettingsrssgetintrinsicexecfilehttpsObject.fromEntriessymbolsBigInt64ArrayutilityaccessibilityES2015mapreduceeventEmittermatchAlldirinstallerES6lookes2015reduceObject.getPrototypeOfmodulecorerouteyupfromtoobjectdomsource maplockfileexpresshtmlwafxmlfastcopyanimationeventDispatchersomeObjectnodetostringtagclonegesturesiamflatquerystringecmascriptlastdirectorycoverageES2019walkingreduxcomparemkdirstypanioncolourforEachidleInt8Arraygroupemrgetter0typefilterponyfillautoscalingFloat64Arraystyled-componentspackageonceCSSes8efficientprefixinspectselfsortwgetInt32ArraywidthprocessArrayBuffer#slicebusytoSortedpropcore-jspnpm9ECMAScript 2015recursivenpmignorethreeseseses2018listenersinstrumentationmomentflattentransportvalueses-abstractfunctiondefinepackage managerArray.prototype.flattenbrowserlistregular expressionhookformmoveiteratorkeyutilities-0agentES2017harmonyclassnamesfigletbrowserslistslicejsdomES2016speedtranspilecjktyped arrayvalidationproxyJSON-Schemacollection.es6httpparentsFunction.prototype.namergbemojispecfast-deep-copyvalidtoArraysubprocesstypedarrayelectronkarmatapinternal slotextendfast-clonejasmineshell[[Prototype]]ESnextdependency managerbinaryES2021queryRFC-6455flagsconfigurabletoStringTagWeakMapguidRegExp.prototype.flagses-shim APIasteriskses2016user-streamssinatraArray.prototype.findLastIndexbufferString.prototype.trimec2a11yboundacornwalk.gitignorefeedelbUint32ArrayqscircularenderserializestylinginstallshimUint16Arraysymbol$.extendECMAScript 3Array.prototype.includesdebugger3dES7indicatorIteratorwritemkdirpespreeidentifiersspawnexecutemanipulationinrestfulYAMLarktypecss-in-jsECMAScript 2017utilECMAScript 2021linkreal-timevarkinesisjavascriptdataviewcloudfrontjapanesebinariestypescriptextraspinnerstructuredClonetypesafereact-testing-librarysnsfixed-widtheffect-tsArray.prototype.flatpyyamlansilocationdescriptionprotoperformantfetchisConcatSpreadablereadablees6findURL__proto__fnmatchArrayBufferreact-hook-formWebSocketsredirectvalidatorES3traversegetPrototypeOfweakmapTypedArrayconcatreact poserequirequoteredactlanguagelengthfunction.lengthuninstallutil.inspectmatch.envcloudtrailpropertiesartObject.assignJSONObject.entriesrequestendpointgetdataViewprivateReflect.getPrototypeOfoptioncode pointsio-tsspinnersbindrmdirkoreantimepopmotionhooksdynamodbStyleSheetcolumnspatchworkspace:*private datacallboundprototypeschemedotenvbuffersistanbulobjdescriptorsttymochanegativejshinttypedarraysvariablesES2018form-validationpostcss-pluginfullwidthES2020rangeerrorutilsgetoptjson-schemaSymbolassertioniei18nnativeargvHyBiWeakSetappObject.keysmake dirregexpmulti-packageinternalframeworktapeArray.prototype.filtercopychanneltrimLefttslibeslintebstrimEndTypeScriptenvironmentexec6to5writablecsschromeswfpushfantasy-landsortedbyteLengthmodulessideformsfindupprotocol-buffersES8reuseprogressstringifytranspilerpipebabelreact-hooksmkdirsetPrototypeOf@@toStringTagletflagES2022pathoptimizerescapefpresolvefastclonecryptoxtermeast-asian-widthworkerglobal this valueterminalnopeatomoptimistglobal objectvalidatefsrulestddWebSocketconfigparentrapidfunctionscolumnperformancediffredux-toolkitframercharacteridECMAScript 2019symlinksexpressiontrimrmajaxbeanstalkUnderscorefolderkeysspringgraphqloutputwindowfastformurlgdpr256globalThisglobalsfilestyleroute53definePropertyMicrosoftcloudsearchbundlingshamwaitworkflowmergechinesecensorString.prototype.matchAllcheckfunctionalphoneStreamscodesinferenceRegExp#flagsECMAScript 6trimStartairbnbreworkapollodeterministicpostcsscall-bindrm -frArray.prototype.findLastreact animationdeep-copyremovecacheclassesBigUint64Arrayfind-upcommand-linel10nnodejstrimRightargsmakeUint8Arrayoffsetdeep-cloneenvvisualxhrparsercommanderloggingloadingignoredragequalmrudatesyntaxerrorsetisfastifyintrinsicsafereadablestreames2017colorbinlocaluuidflatMapfast-copydatapinodom-testing-librarymobileasciijQueryRxJSlibphonenumberroutervestastzodtypeerrorimmutablebyteOffsetregularsameValueZeropluginbabel-coreregexarrayshas-ownramdaeslintconfigreactreversed
5.7.97

10 months ago

5.7.96

10 months ago

5.7.95

10 months ago

5.7.94

10 months ago

5.7.93

10 months ago

5.7.92

10 months ago

5.7.91

11 months ago

5.7.90

11 months ago

5.7.89

11 months ago

5.7.88

11 months ago

5.7.87

11 months ago

5.7.86

11 months ago

5.7.85

11 months ago

5.7.84

11 months ago

5.7.83

11 months ago

5.7.82

11 months ago

5.7.81

11 months ago

5.7.80

11 months ago

5.7.79

11 months ago

5.7.78

11 months ago

5.7.77

11 months ago

5.7.76

11 months ago

5.7.75

11 months ago

5.7.74

11 months ago

5.7.73

11 months ago

5.7.72

11 months ago

5.7.71

11 months ago

5.7.70

11 months ago

5.7.69

11 months ago

5.7.68

11 months ago

4.7.68

11 months ago

4.7.67

11 months ago

4.7.66

11 months ago

4.7.65

11 months ago

4.7.64

11 months ago

4.7.63

11 months ago

4.7.62

12 months ago

4.7.61

12 months ago

4.6.61

12 months ago

4.6.60

12 months ago

4.6.59

12 months ago

3.6.59

12 months ago

3.6.58

12 months ago

3.6.57

12 months ago

3.6.56

12 months ago

3.6.55

12 months ago

3.5.55

12 months ago

3.5.54

12 months ago

3.5.53

12 months ago

3.5.52

12 months ago

3.5.51

12 months ago

3.5.50

12 months ago

3.5.49

12 months ago

3.4.49

12 months ago

3.4.48

12 months ago

3.4.47

1 year ago

3.4.46

1 year ago

3.4.45

1 year ago

3.4.44

1 year ago

3.4.43

1 year ago

3.4.42

1 year ago

3.4.41

1 year ago

3.4.40

1 year ago

3.4.39

1 year ago

3.4.38

1 year ago

3.4.37

1 year ago

3.4.36

1 year ago

3.3.36

1 year ago

3.3.35

1 year ago

3.3.34

1 year ago

3.2.34

1 year ago

3.2.33

1 year ago

3.2.32

1 year ago

3.2.31

1 year ago

3.2.30

1 year ago

3.2.29

1 year ago

3.2.28

1 year ago

3.2.27

1 year ago

3.2.26

1 year ago

3.2.25

1 year ago

3.2.24

1 year ago

3.1.24

1 year ago

3.1.23

1 year ago

3.1.22

1 year ago

3.1.21

1 year ago

3.1.20

1 year ago

3.1.19

1 year ago

3.1.18

1 year ago

3.1.17

1 year ago

3.1.16

1 year ago

3.1.15

1 year ago

3.1.14

1 year ago

3.1.13

1 year ago

3.1.12

1 year ago

3.1.11

1 year ago

3.1.10

1 year ago

3.1.9

1 year ago

3.1.8

1 year ago

2.1.8

1 year ago

2.1.7

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

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago