Skip to content

Instantly share code, notes, and snippets.

@lacymorrow
Last active March 26, 2018 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lacymorrow/c94e907b7e2c391ecdf3c48fc80b3754 to your computer and use it in GitHub Desktop.
Save lacymorrow/c94e907b7e2c391ecdf3c48fc80b3754 to your computer and use it in GitHub Desktop.
Returns `true` if running in a Node process
function isNode () {
return Object.prototype.toString.call( typeof process !== 'undefined' ? process : 0 ) === '[object process]'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment