DebugProtectionFunctionTemplate.ts 573 B

1234567891011121314151617181920212223
  1. /**
  2. * @returns {string}
  3. */
  4. export function DebugProtectionFunctionTemplate (): string {
  5. return `
  6. function {debugProtectionFunctionName} (ret) {
  7. function debuggerProtection (counter) {
  8. {debuggerTemplate}
  9. debuggerProtection(++counter);
  10. }
  11. try {
  12. if (ret) {
  13. return debuggerProtection;
  14. } else {
  15. debuggerProtection(0);
  16. }
  17. } catch (y) {}
  18. }
  19. `;
  20. }