We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Dispatcher.isDebug
1 parent d27165f commit d363fc3Copy full SHA for d363fc3
src/transforms/dispatcher.ts
@@ -68,6 +68,8 @@ import Template from "../templates/template";
68
* 3. using `this`
69
*/
70
export default class Dispatcher extends Transform {
71
+ // Debug mode preserves function names
72
+ isDebug = false;
73
count: number;
74
75
constructor(o) {
@@ -196,7 +198,9 @@ export default class Dispatcher extends Transform {
196
198
// map original name->new game
197
199
var gen = this.getGenerator();
200
Object.keys(functionDeclarations).forEach((name) => {
- newFnNames[name] = gen.generate();
201
+ newFnNames[name] = this.isDebug
202
+ ? "_dispatcher_" + this.count + "_" + name
203
+ : gen.generate();
204
});
205
// set containing new name
206
var set = new Set(Object.keys(newFnNames));
0 commit comments