tlojs
Version:
The Last One - The last npm package you'll need to install
18 lines (17 loc) • 461 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Sum = void 0;
var Sum = /** @class */ (function () {
function Sum() {
this.name = 'sum';
}
Sum.prototype.execute = function (cells) {
var results = 0;
cells
.select(function (x) { return x.value; })
.map(function (x) { return results += x; });
return results;
};
return Sum;
}());
exports.Sum = Sum;