UNPKG

@spalger/kibana

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

16 lines (14 loc) 366 B
define(function (require) { var _ = require('lodash'); return function (bucket) { if (bucket && _.isPlainObject(bucket.buckets)) { return _.map(bucket.buckets, function (value, key) { var item = _.cloneDeep(value); item.key = key; return item; }); } else { return bucket && bucket.buckets || []; } }; });