Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7fde04

Browse files
committed
style($parse): small readability improvements
1 parent 472019f commit f7fde04

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ng/parse.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ function $ParseProvider() {
992992
this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {
993993
$parseOptions.csp = $sniffer.csp;
994994

995-
return function(exp, interceptorFn) {
995+
return function $parse(exp, interceptorFn) {
996996
var parsedExpression, oneTime, cacheKey;
997997

998998
switch (typeof exp) {
@@ -1012,10 +1012,10 @@ function $ParseProvider() {
10121012
parsedExpression = parser.parse(exp);
10131013

10141014
if (parsedExpression.constant) {
1015-
parsedExpression.$$watchDelegate = constantWatch;
1015+
parsedExpression.$$watchDelegate = constantWatchDelegate;
10161016
} else if (oneTime) {
10171017
parsedExpression.$$watchDelegate = parsedExpression.literal ?
1018-
oneTimeLiteralWatch : oneTimeWatch;
1018+
oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;
10191019
}
10201020

10211021
cache[cacheKey] = parsedExpression;
@@ -1030,7 +1030,7 @@ function $ParseProvider() {
10301030
}
10311031
};
10321032

1033-
function oneTimeWatch(scope, listener, objectEquality, parsedExpression) {
1033+
function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {
10341034
var unwatch, lastValue;
10351035
return unwatch = scope.$watch(function oneTimeWatch(scope) {
10361036
return parsedExpression(scope);
@@ -1049,7 +1049,7 @@ function $ParseProvider() {
10491049
}, objectEquality);
10501050
}
10511051

1052-
function oneTimeLiteralWatch(scope, listener, objectEquality, parsedExpression) {
1052+
function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {
10531053
var unwatch;
10541054
return unwatch = scope.$watch(function oneTimeWatch(scope) {
10551055
return parsedExpression(scope);
@@ -1073,7 +1073,7 @@ function $ParseProvider() {
10731073
}
10741074
}
10751075

1076-
function constantWatch(scope, listener, objectEquality, parsedExpression) {
1076+
function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {
10771077
var unwatch;
10781078
return unwatch = scope.$watch(function constantWatch(scope) {
10791079
return parsedExpression(scope);

0 commit comments

Comments
 (0)