Default.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { TInputOptions } from '../../types/options/TInputOptions';
  2. import { IdentifierNamesGenerator } from '../../enums/generators/identifier-names-generators/IdentifierNamesGenerator';
  3. import { ObfuscationTarget } from '../../enums/ObfuscationTarget';
  4. import { SourceMapMode } from '../../enums/source-map/SourceMapMode';
  5. export const DEFAULT_PRESET: TInputOptions = Object.freeze({
  6. compact: true,
  7. config: '',
  8. controlFlowFlattening: false,
  9. controlFlowFlatteningThreshold: 0.75,
  10. deadCodeInjection: false,
  11. deadCodeInjectionThreshold: 0.4,
  12. debugProtection: false,
  13. debugProtectionInterval: false,
  14. disableConsoleOutput: false,
  15. domainLock: [],
  16. exclude: [],
  17. identifierNamesGenerator: IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,
  18. identifiersPrefix: '',
  19. identifiersDictionary: ["qwertyuiop", "asdfghjkl", "zxcvbnm"],
  20. inputFileName: '',
  21. log: false,
  22. renameGlobals: false,
  23. reservedNames: [],
  24. reservedStrings: [],
  25. rotateStringArray: true,
  26. seed: 0,
  27. selfDefending: false,
  28. sourceMap: false,
  29. sourceMapBaseUrl: '',
  30. sourceMapFileName: '',
  31. sourceMapMode: SourceMapMode.Separate,
  32. stringArray: true,
  33. stringArrayEncoding: false,
  34. stringArrayThreshold: 0.75,
  35. target: ObfuscationTarget.Browser,
  36. transformObjectKeys: false,
  37. unicodeEscapeSequence: false
  38. });