added tslint-loader and tslint fixes

This commit is contained in:
sanex3339
2016-12-21 21:37:37 +03:00
parent 435370687a
commit 034d3774f8
25 changed files with 176 additions and 162 deletions
+17 -17
View File
@@ -59,6 +59,23 @@ export class JavaScriptObfuscatorInternal implements IJavaScriptObfuscator {
this.options = options;
}
/**
* @param sourceCode
* @returns {IObfuscationResult}
*/
public obfuscate (sourceCode: string): IObfuscationResult {
// parse AST tree
const astTree: ESTree.Program = esprima.parse(sourceCode, JavaScriptObfuscatorInternal.esprimaParams);
// obfuscate AST tree
const obfuscatedAstTree: ESTree.Program = this.obfuscator.obfuscateAstTree(astTree);
// generate code
const generatorOutput: IGeneratorOutput = this.generateCode(sourceCode, obfuscatedAstTree);
return this.getObfuscationResult(generatorOutput);
}
/**
* @param sourceCode
* @param astTree
@@ -94,21 +111,4 @@ export class JavaScriptObfuscatorInternal implements IJavaScriptObfuscator {
generatorOutput.map
);
}
/**
* @param sourceCode
* @returns {IObfuscationResult}
*/
public obfuscate (sourceCode: string): IObfuscationResult {
// parse AST tree
const astTree: ESTree.Program = esprima.parse(sourceCode, JavaScriptObfuscatorInternal.esprimaParams);
// obfuscate AST tree
const obfuscatedAstTree: ESTree.Program = this.obfuscator.obfuscateAstTree(astTree);
// generate code
const generatorOutput: IGeneratorOutput = this.generateCode(sourceCode, obfuscatedAstTree);
return this.getObfuscationResult(generatorOutput);
}
}