Guest User

Untitled

a guest
Oct 18th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. /**
  2. * MySingleton
  3. *
  4. */
  5. define([
  6.  
  7. ], function( ) {
  8.  
  9. var instance = null;
  10. var p = MySingleton.prototype;
  11.  
  12. function MySingleton() {
  13.  
  14. }
  15.  
  16.  
  17.  
  18. MySingleton.getInstance = function(){
  19. if( instance == null ) instance = new MySingleton();
  20. return instance;
  21. }
  22.  
  23. return MySingleton.getInstance();
  24.  
  25. });
Add Comment
Please, Sign In to add comment