Skip to content

Commit

Permalink
Don’t reiterate enumerables
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Oct 30, 2019
1 parent 37c3882 commit 4824004
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ <h3>Fixed demos</h3>
}

class A { b() {} }
A.prototype.hi = 'hi';
fixed([1, 2, 3, [2, 3]], 'b')
fixed(function a() {}, 'a')
fixed(new A(), 'aClassInstance')
Expand Down
5 changes: 0 additions & 5 deletions src/expanded.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,6 @@ function* iterateImArray(array) {
}

function* iterateProto(object) {
for (const key in object) {
if (isown(object, key)) {
yield formatField(key, valueof(object, key), "observablehq--key");
}
}
for (const key in Object.getOwnPropertyDescriptors(object)) {
yield formatField(key, valueof(object, key), "observablehq--key");
}
Expand Down

0 comments on commit 4824004

Please sign in to comment.