kibana-riya
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
22 lines (19 loc) • 624 B
JavaScript
;
var reduce = require('../lib/reduce.js');
var Chainable = require('../lib/classes/chainable');
module.exports = new Chainable('divide', {
args: [{
name: 'inputSeries',
types: ['seriesList']
}, {
name: 'divisor',
types: ['seriesList', 'number'],
help: 'Number or series to divide by. If passing a seriesList it must contain exactly 1 series.'
}],
help: 'Divides the values of one or more series in a seriesList to each position, in each series, of the input seriesList',
fn: function divideFn(args) {
return reduce(args, function (a, b) {
return a / b;
});
}
});