Is there a property or function from the JS stdlib...
# javascript
e
Is there a property or function from the JS stdlib I can use to check if I'm in Node.js? Or do I have to implement my own.
a
No. You can try define something like this:
Copy code
val isNodeJs: Boolean get() = js("typeof process === 'object' && process.versions !== undefined && process.versions.node !== undefined")
e