GitHub 6248★

Check if the code is running in NodeJS

JavaScript version

const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;

TypeScript version

const isNode: boolean = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
Follow me on and to get more useful contents.