bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-param-reassign.js
function isModifyingProp(reference) {
			var node = reference.identifier;
			var parent = node.parent;

			while (parent && !stopNodePattern.test(parent.type)) {
				switch (parent.type) {

					// e.g. foo.a = 0;
					case "AssignmentExpression":
						return parent.left === node;

					// e.g. ++foo.a;
					case "UpdateExpression":
						return true;

					// e.g. delete foo.a;
					case "UnaryExpression":
						if (parent.operator === "delete") {
							return true;
						}
						break;

					// EXCLUDES: e.g. cache.get(foo.a).b = 0;
					case "CallExpression":
						if (parent.callee !== node) {
							return false;
						}
						break;

					// EXCLUDES: e.g. cache[foo.a] = 0;
					case "MemberExpression":
						if (parent.property === node) {
							return false;
						}
						break;

					default:
						break;
				}

				node = parent;
				parent = node.parent;
			}

			return false;
		}
function isModifyingProp(reference) {
			var node = reference.identifier;
			var parent = node.parent;

			while (parent && !stopNodePattern.test(parent.type)) {
				switch (parent.type) {

					// e.g. foo.a = 0;
					case "AssignmentExpression":
						return parent.left === node;

					// e.g. ++foo.a;
					case "UpdateExpression":
						return true;

					// e.g. delete foo.a;
					case "UnaryExpression":
						if (parent.operator === "delete") {
							return true;
						}
						break;

					// EXCLUDES: e.g. cache.get(foo.a).b = 0;
					case "CallExpression":
						if (parent.callee !== node) {
							return false;
						}
						break;

					// EXCLUDES: e.g. cache[foo.a] = 0;
					case "MemberExpression":
						if (parent.property === node) {
							return false;
						}
						break;

					default:
						break;
				}

				node = parent;
				parent = node.parent;
			}

			return false;
		}
function isModifyingProp ( reference ) { var node = reference . identifier ; var parent = node . parent ; while ( parent && ! stopNodePattern . test ( parent . type ) ) { switch ( parent . type ) { // e.g. foo.a = 0; case "AssignmentExpression" : return parent . left === node ; // e.g. ++foo.a; case "UpdateExpression" : return true ; // e.g. delete foo.a; case "UnaryExpression" : if ( parent . operator === "delete" ) { return true ; } break ; // EXCLUDES: e.g. cache.get(foo.a).b = 0; case "CallExpression" : if ( parent . callee !== node ) { return false ; } break ; // EXCLUDES: e.g. cache[foo.a] = 0; case "MemberExpression" : if ( parent . property === node ) { return false ; } break ; default : break ; } node = parent ; parent = node . parent ; } return false ; }
Checks whether or not the reference modifies properties of its variable.
@param {Reference} reference - A reference to check.
@returns {boolean} Whether or not the reference modifies properties of its variable.
Checks whether or not the reference modifies properties of its variable .