java/algobox/algobox-microservice/src/main/resources/static/swagger/lib/es5-shim.js
File es5-shim.js
has 1509 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/
Consider simplifying this complex logical expression. Open
Open
if (match) {
// parse months, days, hours, minutes, seconds, and milliseconds
// provide default values if necessary
// parse the UTC offset component
var year = $Number(match[1]),
Function toFixed
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var toFixedShim = function toFixed(fractionDigits) {
var f, x, s, m, e, z, j, k;
// Test for NaN and round fractionDigits down
f = $Number(fractionDigits);
Function splice
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
splice: function splice(start, deleteCount) {
var O = ES.ToObject(this);
var A = [];
var len = ES.ToUint32(O.length);
var relativeStart = ES.ToInteger(start);
Function split
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
StringPrototype.split = function (separator, limit) {
var string = String(this);
if (typeof separator === 'undefined' && limit === 0) {
return [];
}
Consider simplifying this complex logical expression. Open
Open
if (
hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) &&
minute < 60 && second < 60 && millisecond < 1000 &&
month > -1 && month < 12 && hourOffset < 24 &&
minuteOffset < 60 && // detect invalid offsets
Function parse
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var parseShim = function parse(string) {
var match = isoDateExpression.exec(string);
if (match) {
// parse months, days, hours, minutes, seconds, and milliseconds
// provide default values if necessary
Function bind
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bind: function bind(that) { // .length is 1
// 1. Let Target be the this value.
var target = this;
// 2. If IsCallable(Target) is false, throw a TypeError exception.
if (!isCallable(target)) {
Function reduceRight
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reduceRight: function reduceRight(callbackfn/*, initial*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
Function keys
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
keys: function keys(object) {
var isFn = isCallable(object);
var isArgs = isArguments(object);
var isObject = object !== null && typeof object === 'object';
var isStr = isObject && isString(object);
Function reduce
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reduce: function reduce(callbackfn/*, initialValue*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
Function Date
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var DateShim = function Date(Y, M, D, h, m, s, ms) {
var length = arguments.length;
var date;
if (this instanceof NativeDate) {
var seconds = s;
Function defineProperties
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var defineProperties = (function (has) {
// Define configurable, writable, and non-enumerable props
// if they don't exist.
var defineProperty;
if (supportsDescriptors) {
Function DateShim
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var DateShim = function Date(Y, M, D, h, m, s, ms) {
Avoid deeply nested control flow statements. Open
Open
for (var i = 1; i < arguments.length - 2; i++) {
if (typeof arguments[i] === 'undefined') {
match[i] = void 0;
}
}
Consider simplifying this complex logical expression. Open
Open
if (
'ab'.split(/(?:ab)*/).length !== 2 ||
'.'.split(/(.?)(.?)/).length !== 4 ||
'tesst'.split(/(s)*/)[1] === 't' ||
'test'.split(/(?:)/, -1).length !== 4 ||
Avoid too many return
statements within this function. Open
Open
var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
XXX found Open
Open
// XXX can't delete prototype in pure-js.
- Exclude checks
TODO found Open
Open
// TODO
- Exclude checks
TODO found Open
Open
// TODO
- Exclude checks
XXX found Open
Open
// XXX Build a dynamic function with desired amount of arguments is the only
- Exclude checks
XXX found Open
Open
// XXX slicedArgs will stand in for "A" if used
- Exclude checks
XXX found Open
Open
// XXX global assignment won't work in embeddings that use
- Exclude checks
TODO found Open
Open
// TODO
- Exclude checks