-
-
Save inimino/260115 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 () { | |
if (typeof exports !== 'undefined') { from = exports } | |
else { from = new(Object) }; | |
} |
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 () { | |
if (typeof exports !== 'undefined') { from = exports } | |
else { from = new(Object) }; | |
} |
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 () { | |
if (typeof exports !== 'undefined') { from = exports } | |
else { from = new(Object) }; | |
} |
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 () { | |
if (typeof exports !== 'undefined') { | |
from = exports } | |
else { | |
from = new(Object) }; | |
} |
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 () { | |
if (typeof exports !== 'undefined') { | |
from = exports } else { | |
from = new(Object) }; | |
} |
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 () { | |
if (typeof exports !== 'undefined') { | |
from = exports | |
} else { | |
from = new(Object) | |
}; | |
} |
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
// #7 | |
// only changing whitespace and not the code itself, this is how I would most likely write it: | |
function(){ | |
if(typeof exports !== 'undefined') from=exports | |
else from=new Object} | |
// #8 | |
// the is #2, with the closing brace moved; I like this one also | |
function(){ | |
if (typeof exports !== 'undefined') { from = exports } | |
else { from = new(Object) }} | |
// #9 | |
// when there is a shorter solution, I often will put the function on one line: | |
function(){from = typeof exports=='undefined' ?{} :exports} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment