MeowWebRTC_stream.js
Function MeowWebRTC_stream
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
Open
var MeowWebRTC_stream = function() {
'use strict';
//var Meow_Process = ['Meow_EnvProcess.js'];
var build = this;
var util = ['util.js'];
- Read upRead up
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
Open
var MeowWebRTC_stream = function() {
'use strict';
//var Meow_Process = ['Meow_EnvProcess.js'];
var build = this;
var util = ['util.js'];
Function MeowDataStream
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MeowWebRTC_stream.MeowDataStream = function(MeowChannel, Meow_Opts) {
if(!(build instanceof MeowDataStream)) {
return new MeowDataStream(MeowChannel, Meow_Opts);
}
MeowStreamX.MeowStream.call(build);
Function MeowStreamX
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MeowWebRTC_stream.MeowStreamX = function() {
MeowEmitter.call(build);
MeowStreamX.prototype = new MeowEmitter();
// exporting
module.exports = MeowStreamX;
Function pipe
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
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();