Created
December 4, 2013 02:47
-
-
Save rlidwka/7781505 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_global() { | |
if (typeof(window) === 'undefined' && typeof(window) === 'object' && window != null && window.window === window) | |
return window | |
if (typeof(global) === 'undefined' && typeof(global) === 'object' && global != null && global.global === global) | |
return global | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment