/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v22.23.2
test/fixtures/deep-exit.js
15 строк
247 B
Joyee Cheung
src: parse --stack-trace-limit and use it in --trace-* flags
04 окт 2024, 20:20
Не верифицирован
04 окт 2024, 20:20
b229083
Код
Авторство
О чём код?
'use strict'; // This is meant to be run with --trace-exit. const depth = parseInt(process.env.STACK_DEPTH) || 30; let counter = 1; function recurse() { if (counter++ < depth) { recurse(); } else { process.exit(0); } } recurse();