source-map-support
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "source-map-support", | ||
"description": "Fixes stack traces for files with source maps", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"main": "./source-map-support.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -10,3 +10,3 @@ var SourceMapConsumer = require('source-map').SourceMapConsumer; | ||
var fileData = fs.readFileSync(position.source, 'utf8'); | ||
var match = /\/\/@\s*sourceMappingURL=(.*)\s*$/m.exec(fileData); | ||
var match = /\/\/[#@]\s*sourceMappingURL=(.*)\s*$/m.exec(fileData); | ||
if (!match) return position; | ||
@@ -67,3 +67,3 @@ var sourceMappingURL = match[1]; | ||
// Most call sites will return the source file from getFileName(), but code | ||
// passed to eval() ending in "//@ sourceURL=..." will return the source file | ||
// passed to eval() ending in "//# sourceURL=..." will return the source file | ||
// from getScriptNameOrSourceURL() instead | ||
@@ -70,0 +70,0 @@ var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); |
15846