Projet

Général

Profil

Paste
Télécharger (320 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / media / js / media.core.js @ e4215af7

1
/**
2
 * Creates a namespace.
3
 *
4
 * @return
5
 *   The created namespace object.
6
 */
7
function namespace () {
8
  var a=arguments, o=null, i, j, d;
9

    
10
  for (i=0; i<a.length; i=i+1) {
11
    d=a[i].split(".");
12
    o=window;
13

    
14
    for (j=0; j<d.length; j=j+1) {
15
      o[d[j]]=o[d[j]] || {};
16
      o=o[d[j]];
17
    }
18
  }
19

    
20
  return o;
21
};