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

18 lines (17 loc) 325 B
var map = { 'false': false, 'off': false, 'no': false, '0': false, 'true': true, 'on': true, 'yes': true, '1': true }; module.exports = function (str) { var bool = map[String(str)]; if (typeof bool !== 'boolean') { throw new TypeError('"' + str + '" does not map to an esBool'); } return bool; };