MCPcopy
hub / github.com/requirejs/requirejs / getGlobal

Function getGlobal

require.js:148–157  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

146 //Allow getting a global that is expressed in
147 //dot notation, like 'a.b.c'.
148 function getGlobal(value) {
149 if (!value) {
150 return value;
151 }
152 var g = global;
153 each(value.split('.'), function (part) {
154 g = g[part];
155 });
156 return g;
157 }
158
159 /**
160 * Constructs an error with a pointer to an URL with more information.

Callers 2

fnFunction · 0.85
newContextFunction · 0.85

Calls 1

eachFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…