Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function namespace(ns, callback, parent){
- callback.call(ns.split('.').reduce(function(i, p){
- return (i[p] == null)? (i[p} = {}): i[p]
- }, parent || window));
- }
- namespace('mattn.hasegawayosuke.tokuhirom', function(){
- this.Miyagawa = function() {
- alert('ouffu')
- };
- });
- mattn.hasegawayosuke.tokuhirom.Miyagawa();
Add Comment
Please, Sign In to add comment