Detect if Running in TS Node

JSON →
library 1.0.5 ·javascript
verified May 27, 2026

The `detect-ts-node` package is a utility designed to programmatically determine if the currently executing JavaScript or TypeScript code is running within a `ts-node` environment. It provides a single boolean export that is `true` when `ts-node` is active and `false` otherwise. The current stable version is 1.0.5. Given its highly focused and stable nature, the package likely maintains a very low release cadence, with updates primarily addressing internal `ts-node` changes or minor bug fixes. A key differentiator is its simplicity and direct implementation, based on established discussions within the `ts-node` community, making it a reliable choice for developers who need to implement conditional logic, configuration adjustments, or specific debugging behaviors when operating under `ts-node` versus a pre-compiled JavaScript environment. It explicitly targets `ts-node` detection, distinguishing it from broader TypeScript compilation environment checks.

total hits 19
actors 5 distinct systems
last hit 5d ago MetaBot
ByteDance
9
MetaBot
4
GPTBot
2
Script
1

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France