mbroadst/rethunk

View on GitHub
lib/index.js

Summary

Maintainability
F
1 mo
Test Coverage

File index.js has 519 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";
var Promise = require('bluebird');

var helper = require(__dirname + '/helper.js');
var Connection = require(__dirname + '/connection.js');
Severity: Major
Found in lib/index.js - About 1 day to fix

    Function r has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function r() {
      var self = this;      // jshint ignore:line
      var _r = function(x) {
        return new Term(_r).expr(x);
      };
    Severity: Minor
    Found in lib/index.js - About 1 hr to fix

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

      r.prototype.round = function(num) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.round', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 332..338
      lib/index.js on lines 340..346
      lib/index.js on lines 348..354

      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 149.

      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 4 locations. Consider refactoring.
      Open

      r.prototype.floor = function(num) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.floor', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 332..338
      lib/index.js on lines 348..354
      lib/index.js on lines 356..362

      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 149.

      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 4 locations. Consider refactoring.
      Open

      r.prototype.ceil = function(num) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.ceil', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 332..338
      lib/index.js on lines 340..346
      lib/index.js on lines 356..362

      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 149.

      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 4 locations. Consider refactoring.
      Open

      r.prototype.not = function(bool) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.not', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 340..346
      lib/index.js on lines 348..354
      lib/index.js on lines 356..362

      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 149.

      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

      r.prototype.binary = function(bin) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.binary', this);
        }
      Severity: Major
      Found in lib/index.js and 1 other location - About 5 hrs to fix
      lib/index.js on lines 509..516

      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 149.

      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

      r.prototype.geojson = function(value) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.geojson', this);
        }
      Severity: Major
      Found in lib/index.js and 1 other location - About 5 hrs to fix
      lib/index.js on lines 455..462

      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 149.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.lt = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.lt', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.do = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.do', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.max = function() {
        var _len = arguments.length;var _args = new Array(_len); for(var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 1, Infinity, 'r.max', this);
        var term = new Term(this).expr(_args[0]);
        return term.max.apply(term, _args.slice(1));
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.div = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.div', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 4 locations. Consider refactoring.
      Open

      r.prototype.tableCreate = function(table, options) {
        if (Term.prototype._fastArityRange(arguments.length, 1, 2) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arityRange(_args, 1, 2, 'r.tableCreate', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 129..135
      lib/index.js on lines 137..143
      lib/index.js on lines 386..392

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.gt = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.gt', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.ge = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.ge', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.le = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.le', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.ne = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.ne', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.sum = function() {
        var _len = arguments.length;var _args = new Array(_len); for(var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 1, Infinity, 'r.sum', this);
        var term = new Term(this).expr(_args[0]);
        return term.sum.apply(term, _args.slice(1));
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 592..597

      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 146.

      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 4 locations. Consider refactoring.
      Open

      r.prototype.table = function(table, options) {
        if (Term.prototype._fastArityRange(arguments.length, 1, 2) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arityRange(_args, 1, 2, 'table', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 137..143
      lib/index.js on lines 145..151
      lib/index.js on lines 386..392

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.avg = function() {
        var _len = arguments.length;var _args = new Array(_len); for(var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 1, Infinity, 'r.avg', this);
        var term = new Term(this).expr(_args[0]);
        return term.avg.apply(term, _args.slice(1));
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590

      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 146.

      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 4 locations. Consider refactoring.
      Open

      r.prototype.js = function(jsString, options) {
        if (Term.prototype._fastArityRange(arguments.length, 1, 2) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arityRange(_args, 1, 2, 'r.js', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 129..135
      lib/index.js on lines 145..151
      lib/index.js on lines 386..392

      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 146.

      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 4 locations. Consider refactoring.
      Open

      r.prototype.ISO8601 = function(isoTime, options) {
        if (Term.prototype._fastArityRange(arguments.length, 1, 2) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arityRange(_args, 1, 2, 'r.ISO8601', this);
        }
      Severity: Major
      Found in lib/index.js and 3 other locations - About 5 hrs to fix
      lib/index.js on lines 129..135
      lib/index.js on lines 137..143
      lib/index.js on lines 145..151

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.add = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.add', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.eq = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.eq', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.sub = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.sub', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.mul = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.mul', this);
      
        var term = new Term(this).expr(_args[0]);
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 571..576
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 15 locations. Consider refactoring.
      Open

      r.prototype.min = function() {
        var _len = arguments.length;var _args = new Array(_len); for(var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 1, Infinity, 'r.min', this);
        var term = new Term(this).expr(_args[0]);
        return term.min.apply(term, _args.slice(1));
      Severity: Major
      Found in lib/index.js and 14 other locations - About 5 hrs to fix
      lib/index.js on lines 229..235
      lib/index.js on lines 237..243
      lib/index.js on lines 245..251
      lib/index.js on lines 253..259
      lib/index.js on lines 284..290
      lib/index.js on lines 292..298
      lib/index.js on lines 300..306
      lib/index.js on lines 308..314
      lib/index.js on lines 316..322
      lib/index.js on lines 324..330
      lib/index.js on lines 447..453
      lib/index.js on lines 578..583
      lib/index.js on lines 585..590
      lib/index.js on lines 592..597

      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 146.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.dbCreate = function(db) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'dbCreate', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 121..127
      lib/index.js on lines 153..159
      lib/index.js on lines 177..183
      lib/index.js on lines 206..212
      lib/index.js on lines 214..220
      lib/index.js on lines 378..384
      lib/index.js on lines 415..421

      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 142.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.asc = function(field) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.asc', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 121..127
      lib/index.js on lines 153..159
      lib/index.js on lines 169..175
      lib/index.js on lines 177..183
      lib/index.js on lines 206..212
      lib/index.js on lines 378..384
      lib/index.js on lines 415..421

      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 142.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.db = function(db) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.db', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 153..159
      lib/index.js on lines 169..175
      lib/index.js on lines 177..183
      lib/index.js on lines 206..212
      lib/index.js on lines 214..220
      lib/index.js on lines 378..384
      lib/index.js on lines 415..421

      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 142.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.json = function(json) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.json', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 121..127
      lib/index.js on lines 153..159
      lib/index.js on lines 169..175
      lib/index.js on lines 177..183
      lib/index.js on lines 206..212
      lib/index.js on lines 214..220
      lib/index.js on lines 378..384

      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 142.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.desc = function(field) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.desc', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 121..127
      lib/index.js on lines 153..159
      lib/index.js on lines 169..175
      lib/index.js on lines 177..183
      lib/index.js on lines 214..220
      lib/index.js on lines 378..384
      lib/index.js on lines 415..421

      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 142.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.dbDrop = function(db) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'dbDrop', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 121..127
      lib/index.js on lines 153..159
      lib/index.js on lines 169..175
      lib/index.js on lines 206..212
      lib/index.js on lines 214..220
      lib/index.js on lines 378..384
      lib/index.js on lines 415..421

      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 142.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.epochTime = function(epochTime) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.epochTime', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 121..127
      lib/index.js on lines 153..159
      lib/index.js on lines 169..175
      lib/index.js on lines 177..183
      lib/index.js on lines 206..212
      lib/index.js on lines 214..220
      lib/index.js on lines 415..421

      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 142.

      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 8 locations. Consider refactoring.
      Open

      r.prototype.tableDrop = function(db) {
        if (Term.prototype._fastArity(arguments.length, 1) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 1, 'r.tableDrop', this);
        }
      Severity: Major
      Found in lib/index.js and 7 other locations - About 5 hrs to fix
      lib/index.js on lines 121..127
      lib/index.js on lines 169..175
      lib/index.js on lines 177..183
      lib/index.js on lines 206..212
      lib/index.js on lines 214..220
      lib/index.js on lines 378..384
      lib/index.js on lines 415..421

      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 142.

      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

      r.prototype.now = function() {
        if (Term.prototype._fastArity(arguments.length, 0) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 0, 'now', this);
        }
      Severity: Major
      Found in lib/index.js and 2 other locations - About 5 hrs to fix
      lib/index.js on lines 161..167
      lib/index.js on lines 185..191

      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 140.

      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

      r.prototype.tableList = function() {
        if (Term.prototype._fastArity(arguments.length, 0) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 0, 'r.tableList', this);
        }
      Severity: Major
      Found in lib/index.js and 2 other locations - About 5 hrs to fix
      lib/index.js on lines 185..191
      lib/index.js on lines 364..370

      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 140.

      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

      r.prototype.dbList = function() {
        if (Term.prototype._fastArity(arguments.length, 0) === false) {
          var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
          Term.prototype._arity(_args, 0, 'dbList', this);
        }
      Severity: Major
      Found in lib/index.js and 2 other locations - About 5 hrs to fix
      lib/index.js on lines 161..167
      lib/index.js on lines 364..370

      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 140.

      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

      r.prototype.line = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 2, Infinity, 'r.line', this);
      
        var term = new Term(this);
      Severity: Major
      Found in lib/index.js and 2 other locations - About 4 hrs to fix
      lib/index.js on lines 487..493
      lib/index.js on lines 554..560

      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 126.

      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

      r.prototype.polygon = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 3, Infinity, 'r.polygon', this);
      
        var term = new Term(this);
      Severity: Major
      Found in lib/index.js and 2 other locations - About 4 hrs to fix
      lib/index.js on lines 471..477
      lib/index.js on lines 554..560

      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 126.

      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

      r.prototype.map = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        Term.prototype._arityRange(_args, 1, Infinity, 'r.map', this);
      
        var term = new Term(this);
      Severity: Major
      Found in lib/index.js and 2 other locations - About 4 hrs to fix
      lib/index.js on lines 471..477
      lib/index.js on lines 487..493

      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 126.

      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 7 locations. Consider refactoring.
      Open

      r.prototype.object = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        var term = new Term(this);
        return term.object.apply(term, _args);
      };
      Severity: Major
      Found in lib/index.js and 6 other locations - About 3 hrs to fix
      lib/index.js on lines 270..275
      lib/index.js on lines 277..282
      lib/index.js on lines 372..376
      lib/index.js on lines 429..433
      lib/index.js on lines 435..439
      lib/index.js on lines 441..445

      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 107.

      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 7 locations. Consider refactoring.
      Open

      r.prototype.and = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
      
        var term = new Term(this);
        return term.and.apply(term, _args);
      Severity: Major
      Found in lib/index.js and 6 other locations - About 3 hrs to fix
      lib/index.js on lines 277..282
      lib/index.js on lines 372..376
      lib/index.js on lines 423..427
      lib/index.js on lines 429..433
      lib/index.js on lines 435..439
      lib/index.js on lines 441..445

      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 107.

      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 7 locations. Consider refactoring.
      Open

      r.prototype.args = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        var term = new Term(this);
        return term.args.apply(term, _args);
      };
      Severity: Major
      Found in lib/index.js and 6 other locations - About 3 hrs to fix
      lib/index.js on lines 270..275
      lib/index.js on lines 277..282
      lib/index.js on lines 372..376
      lib/index.js on lines 423..427
      lib/index.js on lines 435..439
      lib/index.js on lines 441..445

      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 107.

      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 7 locations. Consider refactoring.
      Open

      r.prototype.random = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        var term = new Term(this);
        return term.random.apply(term, _args);
      };
      Severity: Major
      Found in lib/index.js and 6 other locations - About 3 hrs to fix
      lib/index.js on lines 270..275
      lib/index.js on lines 277..282
      lib/index.js on lines 372..376
      lib/index.js on lines 423..427
      lib/index.js on lines 429..433
      lib/index.js on lines 441..445

      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 107.

      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 7 locations. Consider refactoring.
      Open

      r.prototype.http = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        var term = new Term(this);
        return term.http.apply(term, _args);
      };
      Severity: Major
      Found in lib/index.js and 6 other locations - About 3 hrs to fix
      lib/index.js on lines 270..275
      lib/index.js on lines 277..282
      lib/index.js on lines 372..376
      lib/index.js on lines 423..427
      lib/index.js on lines 429..433
      lib/index.js on lines 435..439

      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 107.

      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 7 locations. Consider refactoring.
      Open

      r.prototype.or = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
      
        var term = new Term(this);
        return term.or.apply(term, _args);
      Severity: Major
      Found in lib/index.js and 6 other locations - About 3 hrs to fix
      lib/index.js on lines 270..275
      lib/index.js on lines 372..376
      lib/index.js on lines 423..427
      lib/index.js on lines 429..433
      lib/index.js on lines 435..439
      lib/index.js on lines 441..445

      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 107.

      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 7 locations. Consider refactoring.
      Open

      r.prototype.time = function() {
        var _len = arguments.length;var _args = new Array(_len); for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
        var term = new Term(this);
        return term.time.apply(term, _args);
      };
      Severity: Major
      Found in lib/index.js and 6 other locations - About 3 hrs to fix
      lib/index.js on lines 270..275
      lib/index.js on lines 277..282
      lib/index.js on lines 423..427
      lib/index.js on lines 429..433
      lib/index.js on lines 435..439
      lib/index.js on lines 441..445

      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 107.

      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

      r.prototype.setArrayLimit = function(arrayLimit) {
        if (typeof arrayLimit !== 'number') throw new errors.ReqlDriverError('The first argument of `setArrayLimit` must be a number.');
        this.arrayLimit = arrayLimit;
      };
      Severity: Major
      Found in lib/index.js and 2 other locations - About 55 mins to fix
      lib/connection.js on lines 649..652
      lib/index.js on lines 66..69

      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 53.

      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

      r.prototype.setNestingLevel = function(nestingLevel) {
        if (typeof nestingLevel !== 'number') throw new errors.ReqlDriverError('The first argument of `setNestingLevel` must be a number.');
        this.nestingLevel = nestingLevel;
      };
      Severity: Major
      Found in lib/index.js and 2 other locations - About 55 mins to fix
      lib/connection.js on lines 649..652
      lib/index.js on lines 71..74

      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 53.

      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