Genese complexity report

<- dgram.d.ts
Methods : 69
Complexity index : 43.3
Cyclomatic complexity : 69
Cognitive complexity
100 % Correct 69/69
0 % Warning 0/69 (threshold : 10)
0 % Error 0/69 (threshold : 20)
Cyclomatic complexity
100 % Correct 69/69
0 % Warning 0/69 (threshold : 5)
0 % Error 0/69 (threshold : 10)
Methods of dgram.d.ts
createSocket Complexity Index 1 Cyclomatic complexity 1
                            
                                
                
            
                function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; // ------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
createSocket Complexity Index 1 Cyclomatic complexity 1
                            
                                
                
                function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; // ------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
addMembership Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
                    addMembership(multicastAddress: string, multicastInterface?: string): void; // ------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
address Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    address(): AddressInfo; // ----------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
bind Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    bind(port?: number, address?: string, callback?: () => void): void; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
bind Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    bind(port?: number, callback?: () => void): void; // ------------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
bind Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    bind(callback?: () => void): void; // ---------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
bind Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                    
                    bind(options: BindOptions, callback?: () => void): void; // ------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
close Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    close(callback?: () => void): void; // ---------------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
connect Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    connect(port: number, address?: string, callback?: () => void): void; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
connect Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    connect(port: number, callback: () => void): void; // -------------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
disconnect Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    disconnect(): void; // -------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
dropMembership Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                    
                    dropMembership(multicastAddress: string, multicastInterface?: string): void; // ------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
getRecvBufferSize Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    getRecvBufferSize(): number; // ------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
getSendBufferSize Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    getSendBufferSize(): number; // ------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
ref Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    ref(): this; // ----------------------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
remoteAddress Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    remoteAddress(): AddressInfo; // ------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
send Complexity Index 1.7 Cyclomatic complexity 1
                            
                                
                    
                    send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; // ------- +1.7 Complexity index (+1.7 atomic)
            
                            
                        
send Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                    
                    send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void; // ------------------------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
send Complexity Index 1.4 Cyclomatic complexity 1
                            
                                
                    
                    send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void; // ---------------------- +1.4 Complexity index (+1.4 atomic)
            
                            
                        
send Complexity Index 1.7 Cyclomatic complexity 1
                            
                                
                    
                    send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; // ------- +1.7 Complexity index (+1.7 atomic)
            
                            
                        
send Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                    
                    send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void; // ------------------------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
send Complexity Index 1.4 Cyclomatic complexity 1
                            
                                
                    
                    send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void; // ---------------------- +1.4 Complexity index (+1.4 atomic)
            
                            
                        
setBroadcast Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    setBroadcast(flag: boolean): void; // --------------------------------------------------------------------------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
setMulticastInterface Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    setMulticastInterface(multicastInterface: string): void; // ------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
setMulticastLoopback Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    setMulticastLoopback(flag: boolean): void; // --------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
setMulticastTTL Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    setMulticastTTL(ttl: number): void; // -------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
setRecvBufferSize Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    setRecvBufferSize(size: number): void; // ------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
setSendBufferSize Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    setSendBufferSize(size: number): void; // ------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
setTTL Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    setTTL(ttl: number): void; // ------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
unref Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    unref(): this; // ------------------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
addSourceSpecificMembership Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Tells the kernel to join a source-specific multicast channel at the given
                     * `sourceAddress` and `groupAddress`, using the `multicastInterface` with the
                     * `IP_ADD_SOURCE_MEMBERSHIP` socket option.
                     * If the `multicastInterface` argument
                     * is not specified, the operating system will choose one interface and will add
                     * membership to it.
                     * To add membership to every available interface, call
                     * `socket.addSourceSpecificMembership()` multiple times, once per interface.
                     */
                    addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
dropSourceSpecificMembership Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * Instructs the kernel to leave a source-specific multicast channel at the given
                     * `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`
                     * socket option. This method is automatically called by the kernel when the
                     * socket is closed or the process terminates, so most apps will never have
                     * reason to call this.
                     *
                     * If `multicastInterface` is not specified, the operating system will attempt to
                     * drop membership on all valid interfaces.
                     */
                    dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
addListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * events.EventEmitter
                     * 1. close
                     * 2. connect
                     * 3. error
                     * 4. listening
                     * 5. message
                     */
                    addListener(event: string, listener: (...args: any[]) => void): this; // ----------------------------------------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "connect", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "error", listener: (err: Error) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "listening", listener: () => void): this; // ------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
emit Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
            
                    emit(event: string | symbol, ...args: any[]): boolean; // ----------------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "close"): boolean; // ------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "connect"): boolean; // ------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "error", err: Error): boolean; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "listening"): boolean; // --------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
on Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    on(event: string, listener: (...args: any[]) => void): this; // ----------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "connect", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "error", listener: (err: Error) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "listening", listener: () => void): this; // ------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
once Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    once(event: string, listener: (...args: any[]) => void): this; // ------------------------ +0.8 Complexity index (+0.8 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "connect", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "error", listener: (err: Error) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "listening", listener: () => void): this; // ------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
prependListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependListener(event: string, listener: (...args: any[]) => void): this; // --------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "connect", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "error", listener: (err: Error) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "listening", listener: () => void): this; // ------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependOnceListener(event: string, listener: (...args: any[]) => void): this; // ---------------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "close", listener: () => void): this; // -------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "connect", listener: () => void): this; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "error", listener: (err: Error) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "listening", listener: () => void): this; // ------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)