UNPKG

@hirosystems/api-toolkit

Version:
15 lines 653 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDebugging = isDebugging; /* * Reliable way to check if we are debugging. Supports ts-node and other tools unlike some other * approaches that check argv or env vars. It also lazy-loads the `node:inspector` module to avoid * unnecessary overhead in production environments where this function might not be called. */ function isDebugging() { // eslint-disable-next-line @typescript-eslint/no-var-requires const inspector = require('node:inspector'); const url = inspector.url(); return url !== undefined; } //# sourceMappingURL=is-debugging.js.map