MCPcopy
hub / github.com/angular-ui/ui-grid / $parse

Function $parse

lib/test/angular/1.8.0/angular.js:17430–17455  ·  view source on GitHub ↗
(exp, interceptorFn)

Source from the content-addressed store, hash-verified

17428 return $parse;
17429
17430 function $parse(exp, interceptorFn) {
17431 var parsedExpression, cacheKey;
17432
17433 switch (typeof exp) {
17434 case 'string':
17435 exp = exp.trim();
17436 cacheKey = exp;
17437
17438 parsedExpression = cache[cacheKey];
17439
17440 if (!parsedExpression) {
17441 var lexer = new Lexer($parseOptions);
17442 var parser = new Parser(lexer, $filter, $parseOptions);
17443 parsedExpression = parser.parse(exp);
17444
17445 cache[cacheKey] = addWatchDelegate(parsedExpression);
17446 }
17447 return addInterceptor(parsedExpression, interceptorFn);
17448
17449 case 'function':
17450 return addInterceptor(exp, interceptorFn);
17451
17452 default:
17453 return addInterceptor(noop, interceptorFn);
17454 }
17455 }
17456
17457 function $$getAst(exp) {
17458 var lexer = new Lexer($parseOptions);

Callers 15

addPropertyDirectiveFunction · 0.70
$interpolateFunction · 0.70
$RootScopeProviderFunction · 0.70
$SceProviderFunction · 0.70
processPredicatesFunction · 0.70
getSetterFunction · 0.70
createDateInputTypeFunction · 0.70
numberInputTypeFunction · 0.70
parseConstantExprFunction · 0.70
angular.jsFile · 0.70
classDirectiveFunction · 0.70

Calls 2

addWatchDelegateFunction · 0.70
addInterceptorFunction · 0.70

Tested by

no test coverage detected