Default.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 { OptionsPreset } from '../../enums/options/presets/OptionsPreset';
  5. import { SourceMapMode } from '../../enums/source-map/SourceMapMode';
  6. export const DEFAULT_PRESET: TInputOptions = Object.freeze({
  7. compact: true,
  8. config: '',
  9. controlFlowFlattening: false,
  10. controlFlowFlatteningThreshold: 0.75,
  11. deadCodeInjection: false,
  12. deadCodeInjectionThreshold: 0.4,
  13. debugProtection: false,
  14. debugProtectionInterval: false,
  15. disableConsoleOutput: false,
  16. domainLock: [],
  17. exclude: [],
  18. identifierNamesGenerator: IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,
  19. identifiersPrefix: '',
  20. identifiersDictionary: [],
  21. inputFileName: '',
  22. log: false,
  23. numbersToExpressions: false,
  24. optionsPreset: OptionsPreset.Default,
  25. renameGlobals: false,
  26. renameProperties: false,
  27. reservedNames: [],
  28. reservedStrings: [],
  29. rotateStringArray: true,
  30. seed: 0,
  31. selfDefending: false,
  32. shuffleStringArray: true,
  33. simplify: true,
  34. sourceMap: false,
  35. sourceMapBaseUrl: '',
  36. sourceMapFileName: '',
  37. sourceMapMode: SourceMapMode.Separate,
  38. splitStrings: false,
  39. splitStringsChunkLength: 10,
  40. stringArray: true,
  41. stringArrayEncoding: false,
  42. stringArrayThreshold: 0.75,
  43. target: ObfuscationTarget.Browser,
  44. transformObjectKeys: false,
  45. unicodeEscapeSequence: false
  46. });