Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Tweak heading, per @wycats
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 24, 2015
1 parent 83942c4 commit 385bee1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ We already have the precedent of `Object.keys` returning an array of own keys, a
You can view the spec in [markdown format](spec.md) or rendered as [HTML](http://ljharb.github.io/proposal-object-values-entries/).
Note: there's been a small bit of spec refactoring to ensure that `Object.{keys,values,entries}` share the same key ordering.

## Iterables or Arrays?
Consistency with `Object.keys` is paramount in this proposal‘s opinion. A follow-on proposal for an iterable, however, could likely be `Reflect.ownValues` and `Reflect.ownEntries`, which would complete the triplet with `Reflect.ownKeys`, providing an array of both string-valued and symbol-valued properties. However, this proposal is focused on `Object.values`/`Object.entries`, and the existence of either the `Object` or `Reflect` forms should not preclude the existence of the other. In addition, the current precedent for returning iterators from `keys`/`values`/`entries` currently only applies to methods on prototypes - and in addition, “`Object` is special” seems to be something many accept.
## Iterators or Arrays?
Consistency with `Object.keys` is paramount in this proposal‘s opinion. A follow-on proposal for an iterator, however, could likely be `Reflect.ownValues` and `Reflect.ownEntries`, which would complete the triplet with `Reflect.ownKeys`, providing an array of both string-valued and symbol-valued properties. However, this proposal is focused on `Object.values`/`Object.entries`, and the existence of either the `Object` or `Reflect` forms should not preclude the existence of the other. In addition, the current precedent for returning iterators from `keys`/`values`/`entries` currently only applies to methods on prototypes - and in addition, “`Object` is special” seems to be something many accept. Also, arrays are themselves iterable already.

0 comments on commit 385bee1

Please sign in to comment.