expressions nested in expressions made for some indentation issues -- statements are now responsible for their own leading indentation

This commit is contained in:
Jeremy Ashkenas
2009-12-31 16:50:46 -05:00
parent 959c9a31cb
commit c187f2160f
8 changed files with 102 additions and 78 deletions

View File

@@ -3,7 +3,7 @@
// The cornerstone, an each implementation.
// Handles objects implementing forEach, arrays, and raw objects.
_.each = function each(obj, iterator, context) {
var __a, __b, __c, __d, __e, i, index, item, key;
var __a, __b, __c, __d, __e, __f, __g, i, index, item, key;
index = 0;
try {
if (obj.forEach) {
@@ -14,20 +14,22 @@
for (i in __a) {
if (__a.hasOwnProperty(i)) {
item = __a[i];
__b.push(iterator.call(context, item, i, obj));
__c = iterator.call(context, item, i, obj);
__b.push(__c);
}
}
__b;
} else {
__c = _.keys(obj);
__e = [];
for (__d in __c) {
if (__c.hasOwnProperty(__d)) {
key = __c[__d];
__e.push(iterator.call(context, obj[key], key, obj));
__d = _.keys(obj);
__f = [];
for (__e in __d) {
if (__d.hasOwnProperty(__e)) {
key = __d[__e];
__g = iterator.call(context, obj[key], key, obj);
__f.push(__g);
}
}
__e;
__f;
}
} catch (e) {
if (e !== breaker) {

View File

@@ -2,7 +2,7 @@
// The cornerstone, an each implementation.
// Handles objects implementing forEach, arrays, and raw objects.
_.each = function each(obj, iterator, context) {
var __a, __b, __c, __d, __e, i, index, item, key;
var __a, __b, __c, __d, __e, __f, __g, i, index, item, key;
index = 0;
try {
if (obj.forEach) {
@@ -13,20 +13,22 @@ _.each = function each(obj, iterator, context) {
for (i in __a) {
if (__a.hasOwnProperty(i)) {
item = __a[i];
__b.push(iterator.call(context, item, i, obj));
__c = iterator.call(context, item, i, obj);
__b.push(__c);
}
}
__b;
} else {
__c = _.keys(obj);
__e = [];
for (__d in __c) {
if (__c.hasOwnProperty(__d)) {
key = __c[__d];
__e.push(iterator.call(context, obj[key], key, obj));
__d = _.keys(obj);
__f = [];
for (__e in __d) {
if (__d.hasOwnProperty(__e)) {
key = __d[__e];
__g = iterator.call(context, obj[key], key, obj);
__f.push(__g);
}
}
__e;
__f;
}
} catch (e) {
if (e !== breaker) {