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

22 lines (18 loc) 570 B
define(function (require) { return function (_) { _.mixin(_, { /** * Checks to see if an input value is number-like, this * includes strings that parse into valid numbers and objects * that don't have a type of number but still parse properly * via-some sort of valueOf magic * * @param {any} v - the value to check * @return {Boolean} */ isNumeric: function (v) { return !_.isNaN(v) && (typeof v === 'number' || (!_.isArray(v) && !_.isNaN(parseFloat(v)))); }, }); }; });