File polyfills.js
has 286 lines of code (exceeds 250 allowed). Consider refactoring.
var toString = Object.prototype.toString;
var arrayClass = '[object Array]',
funcClass = '[object Function]',
stringClass = '[object String]';
Function indexOf
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Array.prototype.indexOf = function indexOf(searchElement) {
var t = Object(this);
var len = t.length >>> 0;
if (len === 0) {
return -1;
Function event
has 54 lines of code (exceeds 25 allowed). Consider refactoring.
target.attachEvent('on' + type, typeListeners.event = function (e) {
e || (e = root.event);
var documentElement = target.document &&
target.document.documentElement ||
Function forEach
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Array.prototype.forEach = function (callback, thisArg) {
var T, k;
if (this == null) {
throw new TypeError(' this is null or not defined');
Function every
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Array.prototype.every = function every(fun ) {
var object = Object(this),
self = splitString && toString.call(this) === stringClass ?
this.split('') :
object,
Function map
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Array.prototype.map = function map(fun ) {
var object = Object(this),
self = splitString && toString.call(this) === stringClass ?
this.split('') :
object,
Similar blocks of code found in 2 locations. Consider refactoring.
root.Element && root.Element.prototype.attachEvent && !root.Element.prototype.addEventListener && (function () {
function addMethod(name, fn) {
Window.prototype[name] = HTMLDocument.prototype[name] = Element.prototype[name] = fn;
}
Similar blocks of code found in 2 locations. Consider refactoring.
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function indexOf(searchElement) {
var t = Object(this);
var len = t.length >>> 0;
if (len === 0) {
Similar blocks of code found in 2 locations. Consider refactoring.
(!root.CustomEvent || typeof root.CustomEvent === 'object') && (function() {
function CustomEvent (type, params) {
var event;
params = params || { bubbles: false, cancelable: false, detail: undefined };
Similar blocks of code found in 2 locations. Consider refactoring.
if (!Object.keys) {
Object.keys = (function() {
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
Identical blocks of code found in 2 locations. Consider refactoring.
if (!Array.prototype.map) {
Array.prototype.map = function map(fun ) {
var object = Object(this),
self = splitString && toString.call(this) === stringClass ?
this.split('') :
Similar blocks of code found in 2 locations. Consider refactoring.
if (typeof Object.create !== 'function') {
Object.create = (function() {
function Temp() {}
Identical blocks of code found in 2 locations. Consider refactoring.
if (!Array.prototype.every) {
Array.prototype.every = function every(fun ) {
var object = Object(this),
self = splitString && toString.call(this) === stringClass ?
this.split('') :
Identical blocks of code found in 2 locations. Consider refactoring.
if (!Array.prototype.forEach) {
Array.prototype.forEach = function (callback, thisArg) {
var T, k;
if (this == null) {
Identical blocks of code found in 2 locations. Consider refactoring.
if (!Array.prototype.filter) {
Array.prototype.filter = function (predicate) {
var results = [], item, t = new Object(this);
for (var i = 0, len = t.length >>> 0; i < len; i++) {
item = t[i];
Identical blocks of code found in 2 locations. Consider refactoring.
if (!Object.prototype.propertyIsEnumerable) {
Object.prototype.propertyIsEnumerable = function (key) {
for (var k in this) { if (k === key) { return true; } }
return false;
};
Identical blocks of code found in 2 locations. Consider refactoring.
if (!Array.isArray) {
Array.isArray = function (arg) {
return toString.call(arg) === arrayClass;
};
}
There are no issues that match your filters.