{"aliases":["default","es5","modernizr:es5array","blissfuljs"],"browsers":{"ie":"6 - 8"},"spec":"http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.reduce","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce","baseDir":"Array/prototype/reduce","hasTests":true,"rawSource":"\n// Array.prototype.reduce\nArray.prototype.reduce = function reduce(callback) {\n\tif (this === undefined || this === null) {\n\t\tthrow new TypeError(this + 'is not an object');\n\t}\n\n\tif (!(callback instanceof Function)) {\n\t\tthrow new TypeError(callback + ' is not a function');\n\t}\n\n\tvar\n\tobject = Object(this),\n\tscope = arguments[1],\n\tarraylike = object instanceof String ? object.split('') : object,\n\tlength = Math.max(Math.min(arraylike.length, 9007199254740991), 0) || 0,\n\tindex = -1,\n\tpreviousValue;\n\n\tif (1 in arguments) {\n\t\tpreviousValue = arguments[1];\n\t} else {\n\t\twhile (++index < length && !(index in arraylike)) {}\n\n\t\tif (index >= length) {\n\t\t\tthrow new TypeError('Reduce of empty array with no initial value');\n\t\t}\n\n\t\tpreviousValue = arraylike[index];\n\t}\n\n\twhile (++index < length) {\n\t\tif (index in arraylike) {\n\t\t\tpreviousValue = callback(previousValue, arraylike[index], index, object);\n\t\t}\n\t}\n\n\treturn previousValue;\n};\n","minSource":"Array.prototype.reduce=function(t){if(void 0===this||null===this)throw new TypeError(this+\"is not an object\");if(!(t instanceof Function))throw new TypeError(t+\" is not a function\");var i,n=Object(this),r=(arguments[1],n instanceof String?n.split(\"\"):n),e=Math.max(Math.min(r.length,9007199254740991),0)||0,o=-1;if(1 in arguments)i=arguments[1];else{for(;++o<e&&!(o in r););if(o>=e)throw new TypeError(\"Reduce of empty array with no initial value\");i=r[o]}for(;++o<e;)o in r&&(i=t(i,r[o],o,n));return i};","detectSource":"'reduce' in Array.prototype"}