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

Function compute

lib/test/angular/1.8.0/angular.js:14020–14035  ·  view source on GitHub ↗
(values)

Source from the content-addressed store, hash-verified

14018
14019 if (!mustHaveExpression || expressions.length) {
14020 var compute = function(values) {
14021 for (var i = 0, ii = expressions.length; i < ii; i++) {
14022 if (allOrNothing && isUndefined(values[i])) return;
14023 concat[expressionPositions[i]] = values[i];
14024 }
14025
14026 if (contextAllowsConcatenation) {
14027 // If `singleExpression` then `concat[0]` might be a "trusted" value or `null`, rather than a string
14028 return $sce.getTrusted(trustedContext, singleExpression ? concat[0] : concat.join(''));
14029 } else if (trustedContext && concat.length > 1) {
14030 // This context does not allow more than one part, e.g. expr + string or exp + exp.
14031 $interpolateMinErr.throwNoconcat(text);
14032 }
14033 // In an unprivileged context or only one part: just concatenate and return.
14034 return concat.join('');
14035 };
14036
14037 return extend(function interpolationFn(context) {
14038 var i = 0;

Callers 1

$interpolateFunction · 0.70

Calls 1

isUndefinedFunction · 0.70

Tested by

no test coverage detected