kibana-123
Version:
Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic
24 lines (22 loc) • 667 B
JavaScript
var reduce = require('../lib/reduce.js');
var Chainable = require('../lib/classes/chainable');
module.exports = new Chainable('sum', {
args: [
{
name: 'inputSeries',
types: ['seriesList']
},
{
name: 'term',
types: ['seriesList', 'number'],
help: 'Number or series to sum with the input series. If passing a seriesList it must contain exactly 1 series.'
}
],
help: 'Adds the values of one or more series in a seriesList to each position, in each series, of the input seriesList',
aliases: ['add', 'plus'],
fn: function sumFn(args) {
return reduce(args, function (a, b) {
return a + b;
});
}
});