root / drupal7 / sites / all / modules / media / js / media.core.js @ ca0757b9
1 |
|
---|---|
2 |
/**
|
3 |
* Creates a namespace.
|
4 |
*
|
5 |
* @return
|
6 |
* The created namespace object.
|
7 |
*/
|
8 |
function namespace () { |
9 |
var a=arguments, o=null, i, j, d; |
10 |
for (i=0; i<a.length; i=i+1) { |
11 |
d=a[i].split(".");
|
12 |
o=window; |
13 |
for (j=0; j<d.length; j=j+1) { |
14 |
o[d[j]]=o[d[j]] || {}; |
15 |
o=o[d[j]]; |
16 |
} |
17 |
} |
18 |
return o;
|
19 |
}; |