Genese complexity report

<- index.d.ts
Methods : 1
Complexity index : 1.8
Cyclomatic complexity : 1
Cognitive complexity
100 % Correct 1/1
0 % Warning 0/1 (threshold : 10)
0 % Error 0/1 (threshold : 20)
Cyclomatic complexity
100 % Correct 1/1
0 % Warning 0/1 (threshold : 5)
0 % Error 0/1 (threshold : 10)
Methods of index.d.ts
arrify Complexity Index 1.8 Cyclomatic complexity 1
                            
                                
            
            Convert a value to an array.
            
            _Supplying `null` or `undefined` results in an empty array._
            
            @example
            ```
            import arrify = require('arrify');
            
            arrify('🦄');
            //=> ['🦄']
            
            arrify(['🦄']);
            //=> ['🦄']
            
            arrify(new Set(['🦄']));
            //=> ['🦄']
            
            arrify(null);
            //=> []
            
            arrify(undefined);
            //=> []
            ```
            */
            declare function arrify<ValueType>( // --------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            	value: ValueType // --------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            ): ValueType extends (null | undefined) // ----------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            	? []
            	: ValueType extends string // ----------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            	? [string] // --------------------------------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
            	: ValueType extends ReadonlyArray<unknown> // TODO: Use 'readonly unknown[]' in the next major version // ------- +0.2 Complexity index (+0.2 atomic)
            	? ValueType // -------------------------------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
            	: ValueType extends Iterable<infer T> // ------------------------------------------------------------------------ +0.3 Complexity index (+0.3 atomic)
            	? T[] // -------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            	: [ValueType]; // ----------------------------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)