-
-
Save shepherdwind/2955069 to your computer and use it in GitHub Desktop.
CoffeeScript: self executing anonymous functions
This file contains hidden or 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
# Is there a coffeescript way of doing this? | |
(function($, exports){ | |
# doing random stuff here | |
})(jQuery, window); | |
# Other than this: | |
( ($, exports) -> | |
# doing random stuff here | |
)(jQuery, window) | |
# no syntactic sugar, but you can do: | |
do ($ = jQuery, exports = window) -> | |
# doing random stuff here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment