MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / compute

Function compute

lib/test/angular/1.7.0/angular.js:13386–13401  ·  view source on GitHub ↗
(values)

Source from the content-addressed store, hash-verified

13384
13385 if (!mustHaveExpression || expressions.length) {
13386 var compute = function(values) {
13387 for (var i = 0, ii = expressions.length; i < ii; i++) {
13388 if (allOrNothing && isUndefined(values[i])) return;
13389 concat[expressionPositions[i]] = values[i];
13390 }
13391
13392 if (contextAllowsConcatenation) {
13393 // If `singleExpression` then `concat[0]` might be a "trusted" value or `null`, rather than a string
13394 return $sce.getTrusted(trustedContext, singleExpression ? concat[0] : concat.join(''));
13395 } else if (trustedContext && concat.length > 1) {
13396 // This context does not allow more than one part, e.g. expr + string or exp + exp.
13397 $interpolateMinErr.throwNoconcat(text);
13398 }
13399 // In an unprivileged context or only one part: just concatenate and return.
13400 return concat.join('');
13401 };
13402
13403 return extend(function interpolationFn(context) {
13404 var i = 0;

Callers 1

$interpolateFunction · 0.70

Calls 1

isUndefinedFunction · 0.70

Tested by

no test coverage detected