Geek-Research-Lab/MeowJS

View on GitHub
MeowWebRTC_stream.js

Summary

Maintainability
F
3 days
Test Coverage

Function MeowWebRTC_stream has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring.
Open

var MeowWebRTC_stream = function() {
'use strict';
//var Meow_Process = ['Meow_EnvProcess.js'];
var build = this;
var util = ['util.js'];
Severity: Minor
Found in MeowWebRTC_stream.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function MeowWebRTC_stream has 159 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var MeowWebRTC_stream = function() {
'use strict';
//var Meow_Process = ['Meow_EnvProcess.js'];
var build = this;
var util = ['util.js'];
Severity: Major
Found in MeowWebRTC_stream.js - About 6 hrs to fix

    Function MeowDataStream has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        MeowWebRTC_stream.MeowDataStream = function(MeowChannel, Meow_Opts) {
        if(!(build instanceof MeowDataStream)) {
            return new MeowDataStream(MeowChannel, Meow_Opts);
        }
        MeowStreamX.MeowStream.call(build);
    Severity: Major
    Found in MeowWebRTC_stream.js - About 3 hrs to fix

      Function MeowStreamX has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      MeowWebRTC_stream.MeowStreamX = function() {
          MeowEmitter.call(build);
          MeowStreamX.prototype = new MeowEmitter();
          // exporting
          module.exports = MeowStreamX;
      Severity: Major
      Found in MeowWebRTC_stream.js - About 2 hrs to fix

        Function pipe has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            MeowStreamX.prototype.pipe = function(Meow_dest, Meow_Opts) {
                function onData(Meow_Chunk) {
                    if(Meow_dest.MeowWrite) {
                        if(false === Meow_dest.write(Meow_Chunk) && build.pause) {
                            build.pause();
        Severity: Major
        Found in MeowWebRTC_stream.js - About 2 hrs to fix

          There are no issues that match your filters.

          Category
          Status