Showing 13 of 34 total issues
Function export
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.export = function (cmd) {
var arraysEqual = function (a, b) {
if (a.length !== b.length) {
return false;
Function registerEachFn
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Command.prototype.registerEachFn = function (name, fn, plugin) {
if (typeof fn !== 'function') {
throw new Error('cmd.registerEachFn(name, fn), fn was not a function, got ' + typeof fn);
}
Function export
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.export = function (cmd) {
/**
* Command: clone(null) === [false]
* clone.raw(null) === false
Function registerAllFn
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Command.prototype.registerAllFn = function (name, fn, plugin) {
if (typeof fn !== 'function') {
throw new Error('cmd.registerAllFn(name, fn), fn was not a function, got ' + typeof fn);
}
Function export
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.export = function (cmd) {
/**
* Dependencies
*/
cmd.use('compare', 'clone');
Function all
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.all = function (args, vals) {
var groups = [];
var groupBy = [];
vals.forEach(function (val, i) {
Function use
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Command.prototype.use = function () {
var self = this;
Array.prototype.forEach.call(arguments, function (name) {
if (name === '*') {
var libs = [
Function export
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.export = function () {
/**
* Command: compare(6, 3) === -1
* @author Nate Ferrero
Function export
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.export = function () {
/**
* Command: case.lower('aAa') === ['aaa']
Function raw
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.raw = function (_a, _b) {
var compare = function (a, b) {
if (typeof a !== typeof b) {
return compare(typeof a, typeof b);
}
Function all
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.all = function (args, vals) {
var direction = 1;
var local = cmd.clone.with(args);
if (local && local.length && typeof local[0] === 'number') {
Consider simplifying this complex logical expression. Open
Open
if (index > 0 && index + match.length !== title.length &&
match.search(smallWords) > -1 && title.charAt(index - 2) !== ':' &&
(title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') &&
title.charAt(index - 1).search(/[^\s-]/) < 0) {
return match.toLowerCase();
Avoid too many return
statements within this function. Open
Open
return cloneObject(obj);