clean-stack
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -8,3 +8,3 @@ import escapeStringRegexp from 'escape-string-regexp'; | ||
export default function cleanStack(stack, {pretty = false, basePath} = {}) { | ||
const basePathRegex = basePath && new RegExp(`(at | \\()(file://)?${escapeStringRegexp(basePath.replace(/\\/g, '/'))}/?`, 'g'); | ||
const basePathRegex = basePath && new RegExp(`(file://)?${escapeStringRegexp(basePath.replace(/\\/g, '/'))}/?`, 'g'); | ||
@@ -40,3 +40,3 @@ if (typeof stack !== 'string') { | ||
if (basePathRegex) { | ||
line = line.replace(basePathRegex, '$1'); | ||
line = line.replace(basePathRegex, ''); | ||
} | ||
@@ -43,0 +43,0 @@ |
{ | ||
"name": "clean-stack", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Clean up error stack traces", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
7133