Guest User

Untitled

a guest
Dec 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. define([
  2. "some/class1",
  3. "some/class2",
  4. "other/classes"
  5. ],fucntion(class1, class2, classes){
  6. return {
  7. myUtility: function(arg1, arg2) { ..... },
  8. myOtherUtil: function(arg2, arg2) { .... },
  9. commonClass2: class2.commonUtil
  10. };
  11.  
  12. });
  13.  
  14. /// using commonUtils from the debugger....
  15. require([
  16. "myNS/commonUtils"
  17. ],function(commonUtils) {
  18. commonUtils.myUtility("omg", "its not a global");
  19. commonUtils.myOtherUtil("omg, "neither am I");
  20. commonUtils.commonClass2("omg", "I'm actually part of some/class2!");
  21. });
Add Comment
Please, Sign In to add comment