Skip to content

Instantly share code, notes, and snippets.

@jareware
Last active December 26, 2015 07:09
Show Gist options
  • Save jareware/7113618 to your computer and use it in GitHub Desktop.
Save jareware/7113618 to your computer and use it in GitHub Desktop.
Returning ASAP in AMD modules
define([ 'lib/foo' ], function(foo) {
var MY_CONST = 123;
var myModuleState = 'derp';
return {
bar: bar,
baz: baz
};
function bar() {
// ...
}
// and so on
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment