Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define([
- "some/class1",
- "some/class2",
- "other/classes"
- ],fucntion(class1, class2, classes){
- return {
- myUtility: function(arg1, arg2) { ..... },
- myOtherUtil: function(arg2, arg2) { .... },
- commonClass2: class2.commonUtil
- };
- });
- /// using commonUtils from the debugger....
- require([
- "myNS/commonUtils"
- ],function(commonUtils) {
- commonUtils.myUtility("omg", "its not a global");
- commonUtils.myOtherUtil("omg, "neither am I");
- commonUtils.commonClass2("omg", "I'm actually part of some/class2!");
- });
Add Comment
Please, Sign In to add comment