process
global object that provides information about the current Node.js process.process
, process.versions
and process.versions.node
are defined.const isNode = () => typeof process !== 'undefined' && !!process.versions && !!process.versions.node;
isNode(); // true (Node)
isNode(); // false (browser)
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️