MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / getGlobal

Function getGlobal

public/javascripts/require.js:146–155  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

144 //Allow getting a global that is expressed in
145 //dot notation, like 'a.b.c'.
146 function getGlobal(value) {
147 if (!value) {
148 return value;
149 }
150 var g = global;
151 each(value.split('.'), function (part) {
152 g = g[part];
153 });
154 return g;
155 }
156
157 /**
158 * 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