Guest User

Untitled

a guest
Jul 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function namespace(ns, callback, parent){
  2. callback.call(ns.split('.').reduce(function(i, p){
  3. return (i[p] == null)? (i[p} = {}): i[p]
  4. }, parent || window));
  5. }
  6.  
  7. namespace('mattn.hasegawayosuke.tokuhirom', function(){
  8. this.Miyagawa = function() {
  9. alert('ouffu')
  10. };
  11. });
  12.  
  13. mattn.hasegawayosuke.tokuhirom.Miyagawa();
Add Comment
Please, Sign In to add comment