generator-ssjs
Version:
yo generator to scaffold an [SSJS Framework](https://adessose.github.io/ssjs-webpack/) project. ## Installation ``` # install yo npm install --global yo
15 lines (13 loc) • 388 B
JavaScript
if (!Array.prototype.reduce) {
Array.prototype.reduce = function (callbackFn, initialValue) {
var accumulator = initialValue;
for (var i = 0; i < this.length; i++) {
if (accumulator !== undefined) {
accumulator = callbackFn.call(undefined, accumulator, this[i], i, this);
} else {
accumulator = this[i];
}
}
return accumulator;
};
}