gardr-validator
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -7,2 +7,5 @@ 'use strict'; | ||
var RE_LAST_URL_SECTION = /([^\/]+)\/?$/i; | ||
var RE_QUERY = /\?.*$/; | ||
function formatTraceData(output, data){ | ||
@@ -29,2 +32,14 @@ if (data) { | ||
} | ||
if (!entry.file && entry.sourceURL){ | ||
var match = entry.sourceURL.replace(RE_QUERY, '').match(RE_LAST_URL_SECTION); | ||
if (match && match[1]){ | ||
entry.file = match[1]; | ||
} | ||
if (!entry.file){ | ||
entry.file = path.dirname(entry.sourceURL); | ||
} | ||
} | ||
return true; | ||
@@ -31,0 +46,0 @@ } |
{ | ||
"name": "gardr-validator", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "index.js", | ||
@@ -31,3 +31,3 @@ "author": { | ||
"referee": "~1.0.2", | ||
"coveralls": "~2.6.1", | ||
"coveralls": "~2.8.0", | ||
"istanbul": "~0.2.3", | ||
@@ -34,0 +34,0 @@ "jshint": "~2.4.1" |
165780
2729