implementing grayrest's suggested cleanup for object comprehensions

This commit is contained in:
Jeremy Ashkenas
2010-02-14 17:35:14 -05:00
parent e110042275
commit 7667e16732
6 changed files with 44 additions and 74 deletions

View File

@@ -79,12 +79,10 @@
var __a, __b, key, val;
return ((function() {
__a = []; __b = this.variables;
for (key in __b) {
for (key in __b) if (__hasProp.call(__b, key)) {
val = __b[key];
if (__hasProp.call(__b, key)) {
if (val === 'var') {
__a.push(key);
}
if (val === 'var') {
__a.push(key);
}
}
return __a;
@@ -96,12 +94,10 @@
var __a, __b, key, val;
return ((function() {
__a = []; __b = this.variables;
for (key in __b) {
for (key in __b) if (__hasProp.call(__b, key)) {
val = __b[key];
if (__hasProp.call(__b, key)) {
if (val.assigned) {
__a.push([key, val.value]);
}
if (val.assigned) {
__a.push([key, val.value]);
}
}
return __a;