For Node.js, define a simple function that does minimal computation, but that would blow the stack if called say a million times[0].  Run that function inside of a new vm context[1].  If it errors with a stack overflow, then no TCO.<p>[0] - function n(x){if(x &gt; 0) n(x-1)}<p>[1] - <a href="https:&#x2F;&#x2F;nodejs.org&#x2F;api&#x2F;vm.html#vm_vm_runinnewcontext_code_sandbox_options" rel="nofollow">https:&#x2F;&#x2F;nodejs.org&#x2F;api&#x2F;vm.html#vm_vm_runinnewcontext_code_sa...</a>