var isNode = typeof process != 'undefined' && process.versions && process.versions.node;
var isBrowser = typeof window != 'undefined';
var isModule = typeof module != 'undefined' && module.exports;
Last active
December 10, 2015 23:18
-
-
Save tcr/4508262 to your computer and use it in GitHub Desktop.
How can you detect browser vs. Node.js vs CommonJS?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment