MCPcopy Create free account
hub / github.com/apache/cloudstack / _objectIndex

Function _objectIndex

tools/ngui/static/js/lib/angular.js:6320–6345  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

6318 }
6319
6320 function _objectIndex(obj) {
6321 var indexFn = expression();
6322 consume(']');
6323 return extend(
6324 function(self, locals){
6325 var o = obj(self, locals),
6326 i = indexFn(self, locals),
6327 v, p;
6328
6329 if (!o) return undefined;
6330 v = o[i];
6331 if (v && v.then) {
6332 p = v;
6333 if (!('$$v' in v)) {
6334 p.$$v = undefined;
6335 p.then(function(val) { p.$$v = val; });
6336 }
6337 v = v.$$v;
6338 }
6339 return v;
6340 }, {
6341 assign:function(self, value, locals){
6342 return obj(self, locals)[indexFn(self, locals)] = value;
6343 }
6344 });
6345 }
6346
6347 function _functionCall(fn, contextGetter) {
6348 var argsFn = [];

Callers

nothing calls this directly

Calls 3

expressionFunction · 0.85
consumeFunction · 0.85
extendFunction · 0.85

Tested by

no test coverage detected