mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
51 lines
1.0 KiB
TypeScript
51 lines
1.0 KiB
TypeScript
import { injectable } from 'inversify';
|
|
|
|
import { IObfuscationResult } from './interfaces/IObfuscationResult';
|
|
|
|
import { initializable } from './decorators/Initializable';
|
|
|
|
@injectable()
|
|
export class ObfuscationResult implements IObfuscationResult {
|
|
/**
|
|
* @type {string}
|
|
*/
|
|
@initializable()
|
|
private obfuscatedCode: string;
|
|
|
|
/**
|
|
* @type {string}
|
|
*/
|
|
@initializable()
|
|
private sourceMap: string;
|
|
|
|
/**
|
|
* @param obfuscatedCode
|
|
* @param sourceMap
|
|
*/
|
|
public initialize (obfuscatedCode: string, sourceMap: string): void {
|
|
this.obfuscatedCode = obfuscatedCode;
|
|
this.sourceMap = sourceMap;
|
|
}
|
|
|
|
/**
|
|
* @returns {string}
|
|
*/
|
|
public getObfuscatedCode (): string {
|
|
return this.obfuscatedCode;
|
|
}
|
|
|
|
/**
|
|
* @returns {string}
|
|
*/
|
|
public getSourceMap (): string {
|
|
return this.sourceMap;
|
|
}
|
|
|
|
/**
|
|
* @returns {string}
|
|
*/
|
|
public toString (): string {
|
|
return this.obfuscatedCode;
|
|
}
|
|
}
|