Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

added whitespace #7542

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function isArrayLike(obj) {
```js
var values = {name: 'misko', gender: 'male'};
var log = [];
angular.forEach(values, function(value, key){
angular.forEach(values, function(value, key) {
this.push(key + ': ' + value);
}, log);
expect(log).toEqual(['name: misko', 'gender: male']);
Expand All @@ -229,7 +229,7 @@ function isArrayLike(obj) {
function forEach(obj, iterator, context) {
var key;
if (obj) {
if (isFunction(obj)){
if (isFunction(obj)) {
for (key in obj) {
// Need to check if hasOwnProperty exists,
// as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
Expand Down Expand Up @@ -342,9 +342,9 @@ function setHashKey(obj, h) {
*/
function extend(dst) {
var h = dst.$$hashKey;
forEach(arguments, function(obj){
forEach(arguments, function(obj) {
if (obj !== dst) {
forEach(obj, function(value, key){
forEach(obj, function(value, key) {
dst[key] = value;
});
}
Expand Down Expand Up @@ -493,7 +493,7 @@ function isNumber(value){return typeof value === 'number';}
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a `Date`.
*/
function isDate(value){
function isDate(value) {
return toString.call(value) === '[object Date]';
}

Expand Down Expand Up @@ -611,7 +611,7 @@ function isElement(node) {
* @param str 'key1,key2,...'
* @returns {object} in the form of {key1:true, key2:true, ...}
*/
function makeMap(str){
function makeMap(str) {
var obj = {}, items = str.split(","), i;
for ( i = 0; i < items.length; i++ )
obj[ items[i] ] = true;
Expand Down Expand Up @@ -658,7 +658,7 @@ function size(obj, ownPropsOnly) {

if (isArray(obj) || isString(obj)) {
return obj.length;
} else if (isObject(obj)){
} else if (isObject(obj)) {
for (key in obj)
if (!ownPropsOnly || obj.hasOwnProperty(key))
count++;
Expand Down Expand Up @@ -757,7 +757,7 @@ function isLeafNode (node) {
</file>
</example>
*/
function copy(source, destination){
function copy(source, destination) {
if (isWindow(source) || isScope(source)) {
throw ngMinErr('cpws',
"Can't copy! Making copies of Window or Scope instances is not supported.");
Expand Down Expand Up @@ -786,7 +786,7 @@ function copy(source, destination){
}
} else {
var h = destination.$$hashKey;
forEach(destination, function(value, key){
forEach(destination, function(value, key) {
delete destination[key];
});
for ( var key in source) {
Expand Down Expand Up @@ -1060,7 +1060,7 @@ function tryDecodeURIComponent(value) {
*/
function parseKeyValue(/**string*/keyValue) {
var obj = {}, key_value, key;
forEach((keyValue || "").split('&'), function(keyValue){
forEach((keyValue || "").split('&'), function(keyValue) {
if ( keyValue ) {
key_value = keyValue.split('=');
key = tryDecodeURIComponent(key_value[0]);
Expand Down Expand Up @@ -1422,7 +1422,7 @@ function bootstrap(element, modules, config) {
}

var SNAKE_CASE_REGEXP = /[A-Z]/g;
function snake_case(name, separator){
function snake_case(name, separator) {
separator = separator || '_';
return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
return (pos ? separator : '') + letter.toLowerCase();
Expand Down