Skip to content

Instantly share code, notes, and snippets.

@rwaldron rwaldron/process.js
Last active Oct 11, 2015

Embed
What would you like to do?
Are you really in node? Look for `process` and check its `[[Class]]`
// https://github.com/joyent/node/blob/master/src/node.cc
// Look for: process_template->SetClassName(String::NewSymbol("process"));
//
console.log(
typeof process !== "undefined" && {}.toString.call(process) === "[object process]"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.