Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.217.137
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/gavin/workspace/happymandarin/node_modules/table/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gavin/workspace/happymandarin/node_modules/table/dist/validateTableData.js
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var cov_1t773kz97a = function () {
  var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/validateTableData.js',
      hash = '2e262b14db7cdd95b95ae38fca6a5037d2aa3bd7',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/validateTableData.js',
    statementMap: {
      '0': {
        start: {
          line: 16,
          column: 2
        },
        end: {
          line: 18,
          column: 3
        }
      },
      '1': {
        start: {
          line: 17,
          column: 4
        },
        end: {
          line: 17,
          column: 52
        }
      },
      '2': {
        start: {
          line: 20,
          column: 2
        },
        end: {
          line: 22,
          column: 3
        }
      },
      '3': {
        start: {
          line: 21,
          column: 4
        },
        end: {
          line: 21,
          column: 59
        }
      },
      '4': {
        start: {
          line: 24,
          column: 2
        },
        end: {
          line: 26,
          column: 3
        }
      },
      '5': {
        start: {
          line: 25,
          column: 4
        },
        end: {
          line: 25,
          column: 62
        }
      },
      '6': {
        start: {
          line: 28,
          column: 23
        },
        end: {
          line: 28,
          column: 37
        }
      },
      '7': {
        start: {
          line: 30,
          column: 2
        },
        end: {
          line: 46,
          column: 5
        }
      },
      '8': {
        start: {
          line: 31,
          column: 4
        },
        end: {
          line: 33,
          column: 5
        }
      },
      '9': {
        start: {
          line: 32,
          column: 6
        },
        end: {
          line: 32,
          column: 58
        }
      },
      '10': {
        start: {
          line: 35,
          column: 4
        },
        end: {
          line: 37,
          column: 5
        }
      },
      '11': {
        start: {
          line: 36,
          column: 6
        },
        end: {
          line: 36,
          column: 71
        }
      },
      '12': {
        start: {
          line: 41,
          column: 4
        },
        end: {
          line: 45,
          column: 7
        }
      },
      '13': {
        start: {
          line: 42,
          column: 6
        },
        end: {
          line: 44,
          column: 7
        }
      },
      '14': {
        start: {
          line: 43,
          column: 8
        },
        end: {
          line: 43,
          column: 75
        }
      }
    },
    fnMap: {
      '0': {
        name: '(anonymous_0)',
        decl: {
          start: {
            line: 15,
            column: 15
          },
          end: {
            line: 15,
            column: 16
          }
        },
        loc: {
          start: {
            line: 15,
            column: 25
          },
          end: {
            line: 47,
            column: 1
          }
        }
      },
      '1': {
        name: '(anonymous_1)',
        decl: {
          start: {
            line: 30,
            column: 18
          },
          end: {
            line: 30,
            column: 19
          }
        },
        loc: {
          start: {
            line: 30,
            column: 29
          },
          end: {
            line: 46,
            column: 3
          }
        }
      },
      '2': {
        name: '(anonymous_2)',
        decl: {
          start: {
            line: 41,
            column: 21
          },
          end: {
            line: 41,
            column: 22
          }
        },
        loc: {
          start: {
            line: 41,
            column: 31
          },
          end: {
            line: 45,
            column: 5
          }
        }
      }
    },
    branchMap: {
      '0': {
        loc: {
          start: {
            line: 16,
            column: 2
          },
          end: {
            line: 18,
            column: 3
          }
        },
        type: 'if',
        locations: [{
          start: {
            line: 16,
            column: 2
          },
          end: {
            line: 18,
            column: 3
          }
        }, {
          start: {
            line: 16,
            column: 2
          },
          end: {
            line: 18,
            column: 3
          }
        }]
      },
      '1': {
        loc: {
          start: {
            line: 20,
            column: 2
          },
          end: {
            line: 22,
            column: 3
          }
        },
        type: 'if',
        locations: [{
          start: {
            line: 20,
            column: 2
          },
          end: {
            line: 22,
            column: 3
          }
        }, {
          start: {
            line: 20,
            column: 2
          },
          end: {
            line: 22,
            column: 3
          }
        }]
      },
      '2': {
        loc: {
          start: {
            line: 24,
            column: 2
          },
          end: {
            line: 26,
            column: 3
          }
        },
        type: 'if',
        locations: [{
          start: {
            line: 24,
            column: 2
          },
          end: {
            line: 26,
            column: 3
          }
        }, {
          start: {
            line: 24,
            column: 2
          },
          end: {
            line: 26,
            column: 3
          }
        }]
      },
      '3': {
        loc: {
          start: {
            line: 31,
            column: 4
          },
          end: {
            line: 33,
            column: 5
          }
        },
        type: 'if',
        locations: [{
          start: {
            line: 31,
            column: 4
          },
          end: {
            line: 33,
            column: 5
          }
        }, {
          start: {
            line: 31,
            column: 4
          },
          end: {
            line: 33,
            column: 5
          }
        }]
      },
      '4': {
        loc: {
          start: {
            line: 35,
            column: 4
          },
          end: {
            line: 37,
            column: 5
          }
        },
        type: 'if',
        locations: [{
          start: {
            line: 35,
            column: 4
          },
          end: {
            line: 37,
            column: 5
          }
        }, {
          start: {
            line: 35,
            column: 4
          },
          end: {
            line: 37,
            column: 5
          }
        }]
      },
      '5': {
        loc: {
          start: {
            line: 42,
            column: 6
          },
          end: {
            line: 44,
            column: 7
          }
        },
        type: 'if',
        locations: [{
          start: {
            line: 42,
            column: 6
          },
          end: {
            line: 44,
            column: 7
          }
        }, {
          start: {
            line: 42,
            column: 6
          },
          end: {
            line: 44,
            column: 7
          }
        }]
      }
    },
    s: {
      '0': 0,
      '1': 0,
      '2': 0,
      '3': 0,
      '4': 0,
      '5': 0,
      '6': 0,
      '7': 0,
      '8': 0,
      '9': 0,
      '10': 0,
      '11': 0,
      '12': 0,
      '13': 0,
      '14': 0
    },
    f: {
      '0': 0,
      '1': 0,
      '2': 0
    },
    b: {
      '0': [0, 0],
      '1': [0, 0],
      '2': [0, 0],
      '3': [0, 0],
      '4': [0, 0],
      '5': [0, 0]
    }
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

var _lodash = require('lodash');

var _lodash2 = _interopRequireDefault(_lodash);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * @typedef {string} cell
 */

/**
 * @typedef {cell[]} validateData~column
 */

/**
 * @param {column[]} rows
 * @returns {undefined}
 */
exports.default = rows => {
  ++cov_1t773kz97a.f[0];
  ++cov_1t773kz97a.s[0];

  if (!_lodash2.default.isArray(rows)) {
    ++cov_1t773kz97a.b[0][0];
    ++cov_1t773kz97a.s[1];

    throw new Error('Table data must be an array.');
  } else {
    ++cov_1t773kz97a.b[0][1];
  }

  ++cov_1t773kz97a.s[2];
  if (rows.length === 0) {
    ++cov_1t773kz97a.b[1][0];
    ++cov_1t773kz97a.s[3];

    throw new Error('Table must define at least one row.');
  } else {
    ++cov_1t773kz97a.b[1][1];
  }

  ++cov_1t773kz97a.s[4];
  if (rows[0].length === 0) {
    ++cov_1t773kz97a.b[2][0];
    ++cov_1t773kz97a.s[5];

    throw new Error('Table must define at least one column.');
  } else {
    ++cov_1t773kz97a.b[2][1];
  }

  const columnNumber = (++cov_1t773kz97a.s[6], rows[0].length);

  ++cov_1t773kz97a.s[7];
  _lodash2.default.forEach(rows, cells => {
    ++cov_1t773kz97a.f[1];
    ++cov_1t773kz97a.s[8];

    if (!_lodash2.default.isArray(cells)) {
      ++cov_1t773kz97a.b[3][0];
      ++cov_1t773kz97a.s[9];

      throw new Error('Table row data must be an array.');
    } else {
      ++cov_1t773kz97a.b[3][1];
    }

    ++cov_1t773kz97a.s[10];
    if (cells.length !== columnNumber) {
      ++cov_1t773kz97a.b[4][0];
      ++cov_1t773kz97a.s[11];

      throw new Error('Table must have a consistent number of cells.');
    } else {
      ++cov_1t773kz97a.b[4][1];
    }

    // @todo Make an exception for newline characters.
    // @see https://github.com/gajus/table/issues/9
    ++cov_1t773kz97a.s[12];
    _lodash2.default.forEach(cells, cell => {
      ++cov_1t773kz97a.f[2];
      ++cov_1t773kz97a.s[13];

      if (/[\x01-\x1A]/.test(cell)) {
        ++cov_1t773kz97a.b[5][0];
        ++cov_1t773kz97a.s[14];

        throw new Error('Table data must not contain control characters.');
      } else {
        ++cov_1t773kz97a.b[5][1];
      }
    });
  });
};

module.exports = exports['default'];

Youez - 2016 - github.com/yon3zu
LinuXploit