Add a "keep_fnames" option to the compressor to retain function expression names

See #552. This is useful for stack traces.
This commit is contained in:
Richard van Velzen
2015-01-04 20:14:38 +01:00
parent 4613644cce
commit 0d48af3f36
2 changed files with 16 additions and 1 deletions

View File

@@ -163,3 +163,17 @@ used_var_in_catch: {
}
}
}
keep_fnames: {
options = { unused: true, keep_fnames: true };
input: {
function foo() {
return function bar(baz) {};
}
}
expect: {
function foo() {
return function bar() {};
}
}
}