phadej/menrva

View on GitHub
lib/Bacon.js

Summary

Maintainability
F
2 wks
Test Coverage

File Bacon.js has 2817 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function() {
  var Bacon, BufferingSource, Bus, CompositeUnsubscribe, ConsumingSource, Desc, Dispatcher, End, Error, Event, EventStream, Exception, Initial, Next, None, Observable, Property, PropertyDispatcher, Some, Source, UpdateBarrier, addPropertyInitValueToStream, assert, assertArray, assertEventStream, assertFunction, assertNoArguments, assertString, cloneArray, compositeUnsubscribe, containsDuplicateDeps, convertArgsToFunction, describe, end, eventIdCounter, findDeps, flatMap_, former, idCounter, initial, isArray, isFieldKey, isFunction, isObservable, latter, liftCallback, makeFunction, makeFunctionArgs, makeFunction_, makeObservable, makeSpawner, next, nop, partiallyApplied, recursionDepth, registerObs, spys, toCombinator, toEvent, toFieldExtractor, toFieldKey, toOption, toSimpleExtractor, withDescription, withMethodCallSupport, _, _ref,
    __slice = [].slice,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
Severity: Major
Found in lib/Bacon.js - About 1 wk to fix

    Function when has 196 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Bacon.when = function() {
        var f, i, index, ix, len, needsBarrier, pat, patSources, pats, patterns, resultStream, s, sources, triggerFound, usage, _i, _j, _len, _len1, _ref1;
        if (arguments.length === 0) {
          return Bacon.never();
        }
    Severity: Major
    Found in lib/Bacon.js - About 7 hrs to fix

      Function combineTemplate has 65 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Bacon.combineTemplate = function(template) {
          var applyStreamValue, combinator, compile, compileTemplate, constantValue, current, funcs, mkContext, setValue, streams;
          funcs = [];
          streams = [];
          current = function(ctxStack) {
      Severity: Major
      Found in lib/Bacon.js - About 2 hrs to fix

        Function buffer has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            EventStream.prototype.buffer = function(delay, onInput, onFlush) {
              var buffer, delayMs, reply;
              if (onInput == null) {
                onInput = nop;
              }
        Severity: Major
        Found in lib/Bacon.js - About 2 hrs to fix

          Function scan has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Observable.prototype.scan = function(seed, f) {
                var acc, resultProperty, subscribe;
                f = toCombinator(f);
                acc = toOption(seed);
                subscribe = (function(_this) {
          Severity: Major
          Found in lib/Bacon.js - About 2 hrs to fix

            Function toProperty has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                EventStream.prototype.toProperty = function(initValue_) {
                  var disp, initValue;
                  initValue = arguments.length === 0 ? None : toOption(function() {
                    return initValue_;
                  });
            Severity: Minor
            Found in lib/Bacon.js - About 1 hr to fix

              Function toString has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  toString: function(obj) {
                    var ex, internals, key, value;
                    try {
                      recursionDepth++;
                      if (obj == null) {
              Severity: Minor
              Found in lib/Bacon.js - About 1 hr to fix

                Function pushIt has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Dispatcher.prototype.pushIt = function(event) {
                      var reply, sub, success, tmp, _i, _len;
                      if (!this.pushing) {
                        if (event === this.prevError) {
                          return;
                Severity: Minor
                Found in lib/Bacon.js - About 1 hr to fix

                  Function fromBinder has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Bacon.fromBinder = function(binder, eventTransformer) {
                      if (eventTransformer == null) {
                        eventTransformer = _.id;
                      }
                      return new EventStream(describe(Bacon, "fromBinder", binder, eventTransformer), function(sink) {
                  Severity: Minor
                  Found in lib/Bacon.js - About 1 hr to fix

                    Function retry has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      Bacon.retry = function(options) {
                        var delay, isRetryable, maxRetries, retries, retry, source;
                        if (!isFunction(options.source)) {
                          throw new Exception("'source' option has to be a function");
                        }
                    Severity: Minor
                    Found in lib/Bacon.js - About 1 hr to fix

                      Function mergeAll has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        Bacon.mergeAll = function() {
                          var streams;
                          streams = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
                          if (isArray(streams[0])) {
                            streams = streams[0];
                      Severity: Minor
                      Found in lib/Bacon.js - About 1 hr to fix

                        Function subscribe has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            PropertyDispatcher.prototype.subscribe = function(sink) {
                              var dispatchingId, initSent, reply, valId;
                              initSent = false;
                              reply = Bacon.more;
                              if (this.current.isDefined && (this.hasSubscribers() || this.propertyEnded)) {
                        Severity: Minor
                        Found in lib/Bacon.js - About 1 hr to fix

                          Function combineAsArray has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            Bacon.combineAsArray = function() {
                              var index, s, sources, stream, streams, _i, _len;
                              streams = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
                              if (streams.length === 1 && isArray(streams[0])) {
                                streams = streams[0];
                          Severity: Minor
                          Found in lib/Bacon.js - About 1 hr to fix

                            Function update has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              Bacon.update = function() {
                                var i, initial, lateBindFirst, patterns;
                                initial = arguments[0], patterns = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
                                lateBindFirst = function(f) {
                                  return function() {
                            Severity: Minor
                            Found in lib/Bacon.js - About 1 hr to fix

                              Avoid too many return statements within this function.
                              Open

                                        return obj.toString();
                              Severity: Major
                              Found in lib/Bacon.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return "{..}";
                                Severity: Major
                                Found in lib/Bacon.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                return spawn(event);
                                  Severity: Major
                                  Found in lib/Bacon.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                              return "{" + internals + "}";
                                    Severity: Major
                                    Found in lib/Bacon.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                    return queue.push(event);
                                      Severity: Major
                                      Found in lib/Bacon.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                  return obj;
                                        Severity: Major
                                        Found in lib/Bacon.js - About 30 mins to fix

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              return withDescription.apply(null, [Bacon, "zipAsArray"].concat(__slice.call(streams), [Bacon.zipWith(streams, function() {
                                                var xs;
                                                xs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
                                                return xs;
                                              })]));
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 2 hrs to fix
                                          lib/Bacon.js on lines 363..367

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 87.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              return withDescription.apply(null, [Bacon, "groupSimultaneous"].concat(__slice.call(streams), [Bacon.when(sources, (function() {
                                                var xs;
                                                xs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
                                                return xs;
                                              }))]));
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 2 hrs to fix
                                          lib/Bacon.js on lines 329..333

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 87.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              EventStream.prototype.debounceImmediate = function(delay) {
                                                return withDescription(this, "debounceImmediate", delay, this.flatMapFirst(function(value) {
                                                  return Bacon.once(value).concat(Bacon.later(delay).filter(false));
                                                }));
                                              };
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 2 hrs to fix
                                          lib/Bacon.js on lines 1077..1081

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 80.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              Observable.prototype.bufferingThrottle = function(minimumInterval) {
                                                return withDescription(this, "bufferingThrottle", minimumInterval, this.flatMapConcat(function(x) {
                                                  return Bacon.once(x).concat(Bacon.later(minimumInterval).filter(false));
                                                }));
                                              };
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 2 hrs to fix
                                          lib/Bacon.js on lines 1267..1271

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 80.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                  for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
                                                    i = _ref2[_k];
                                                    if (!sources[i.index].mayHave(i.count)) {
                                                      return true;
                                                    }
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 2 hrs to fix
                                          lib/Bacon.js on lines 2244..2249

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 75.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                  for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
                                                    i = _ref2[_k];
                                                    if (!sources[i.index].hasAtLeast(i.count)) {
                                                      return false;
                                                    }
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 2 hrs to fix
                                          lib/Bacon.js on lines 2258..2263

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 75.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              sub = (_ref1 = (_ref2 = (_ref3 = target.addEventListener) != null ? _ref3 : target.addListener) != null ? _ref2 : target.bind) != null ? _ref1 : target.on;
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 83..83

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 65.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              unsub = (_ref4 = (_ref5 = (_ref6 = target.removeEventListener) != null ? _ref6 : target.removeListener) != null ? _ref5 : target.unbind) != null ? _ref4 : target.off;
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 82..82

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 65.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                          Open

                                                desc = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), f = arguments[_i++];
                                          Severity: Major
                                          Found in lib/Bacon.js and 2 other locations - About 1 hr to fix
                                          lib/Bacon.js on lines 404..404
                                          lib/Bacon.js on lines 2172..2172

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 64.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                          Open

                                              desc = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), obs = arguments[_i++];
                                          Severity: Major
                                          Found in lib/Bacon.js and 2 other locations - About 1 hr to fix
                                          lib/Bacon.js on lines 404..404
                                          lib/Bacon.js on lines 1636..1636

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 64.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                          Open

                                              streams = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), f = arguments[_i++];
                                          Severity: Major
                                          Found in lib/Bacon.js and 2 other locations - About 1 hr to fix
                                          lib/Bacon.js on lines 1636..1636
                                          lib/Bacon.js on lines 2172..2172

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 64.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                            Bacon.constant = function(value) {
                                              return new Property(describe(Bacon, "constant", value), function(sink) {
                                                sink(initial(value));
                                                sink(end());
                                                return nop;
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 253..259

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 61.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                            Bacon.once = function(value) {
                                              return new EventStream(describe(Bacon, "once", value), function(sink) {
                                                sink(toEvent(value));
                                                sink(end());
                                                return nop;
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 238..244

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 61.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                  for (_k = 0, _len2 = sources.length; _k < _len2; _k++) {
                                                    s = sources[_k];
                                                    _results.push(part(s));
                                                  }
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 2964..2967

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 58.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                for (_i = 0, _len = xs.length; _i < _len; _i++) {
                                                  x = xs[_i];
                                                  _results.push(f(x));
                                                }
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 2366..2369

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 58.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              EventStream.prototype.debounce = function(delay) {
                                                return withDescription(this, "debounce", delay, this.flatMapLatest(function(value) {
                                                  return Bacon.later(delay, value);
                                                }));
                                              };
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 1255..1259

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 57.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              EventStream.prototype.delay = function(delay) {
                                                return withDescription(this, "delay", delay, this.flatMap(function(value) {
                                                  return Bacon.later(delay, value);
                                                }));
                                              };
                                          Severity: Major
                                          Found in lib/Bacon.js and 1 other location - About 1 hr to fix
                                          lib/Bacon.js on lines 1261..1265

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 57.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              Property.prototype.or = function(other) {
                                                return withDescription(this, "or", other, this.combine(other, function(x, y) {
                                                  return x || y;
                                                }));
                                              };
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 55 mins to fix
                                          lib/Bacon.js on lines 1604..1608

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 54.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                              Property.prototype.and = function(other) {
                                                return withDescription(this, "and", other, this.combine(other, function(x, y) {
                                                  return x && y;
                                                }));
                                              };
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 55 mins to fix
                                          lib/Bacon.js on lines 1610..1614

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 54.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                for (_i = 0, _len = ss.length; _i < _len; _i++) {
                                                  s = ss[_i];
                                                  this.add(s);
                                                }
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 55 mins to fix
                                          lib/Bacon.js on lines 1922..1925

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 54.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
                                                  subscription = _ref1[_i];
                                                  this.subscribeInput(subscription);
                                                }
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 55 mins to fix
                                          lib/Bacon.js on lines 2443..2446

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 54.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                          Open

                                              Property.prototype.debounce = function(delay) {
                                                return this.delayChanges("debounce", delay, function(changes) {
                                                  return changes.debounce(delay);
                                                });
                                              };
                                          Severity: Major
                                          Found in lib/Bacon.js and 2 other locations - About 50 mins to fix
                                          lib/Bacon.js on lines 1616..1620
                                          lib/Bacon.js on lines 1628..1632

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 51.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                          Open

                                              Property.prototype.delay = function(delay) {
                                                return this.delayChanges("delay", delay, function(changes) {
                                                  return changes.delay(delay);
                                                });
                                              };
                                          Severity: Major
                                          Found in lib/Bacon.js and 2 other locations - About 50 mins to fix
                                          lib/Bacon.js on lines 1622..1626
                                          lib/Bacon.js on lines 1628..1632

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 51.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                          Open

                                              Property.prototype.throttle = function(delay) {
                                                return this.delayChanges("throttle", delay, function(changes) {
                                                  return changes.throttle(delay);
                                                });
                                              };
                                          Severity: Major
                                          Found in lib/Bacon.js and 2 other locations - About 50 mins to fix
                                          lib/Bacon.js on lines 1616..1620
                                          lib/Bacon.js on lines 1622..1626

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 51.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Identical blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                    if (event.hasValue()) {
                                                      if (initSent && event.isInitial()) {
                                                        return Bacon.more;
                                                      } else {
                                                        if (!event.isInitial()) {
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 45 mins to fix
                                          lib/Bacon.js on lines 985..1007

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 50.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Identical blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                      if (event.hasValue()) {
                                                        if (initSent && event.isInitial()) {
                                                          return Bacon.more;
                                                        } else {
                                                          if (!event.isInitial()) {
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 45 mins to fix
                                          lib/Bacon.js on lines 1398..1416

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 50.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                for (_i = 0, _len = obsWaiters.length; _i < _len; _i++) {
                                                  f = obsWaiters[_i];
                                                  f();
                                                }
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 40 mins to fix
                                          lib/Bacon.js on lines 2491..2494

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 49.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
                                                  s = _ref1[_i];
                                                  s();
                                                }
                                          Severity: Minor
                                          Found in lib/Bacon.js and 1 other location - About 40 mins to fix
                                          lib/Bacon.js on lines 2627..2630

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 49.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          There are no issues that match your filters.

                                          Category
                                          Status