@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 (12 loc) • 500 B
JavaScript
var _ = require('lodash');
var SourceMapConsumer = require('source-map/lib/source-map/source-map-consumer').SourceMapConsumer;
var parse = require('url').parse;
function SourceMapReader(url, map) {
this.smc = new SourceMapConsumer(map);
this.url = parse(url);
this.re = new RegExp('(^|/)' + _.escapeRegExp(this.url.pathname.slice(1)) + '($|\\?|#)');
}
SourceMapReader.prototype.matchUrl = function (stackFileName) {
return this.re.test(stackFileName);
};
module.exports = SourceMapReader;