Why does Object.keys return an Array instead of a Set?
joe at trusktr.io
Sun Oct 18 03:25:45 UTC 2020
Well that makes sense! Would it be worth adding an option like
`Object.keys(obj, true)` to return a set? Or perhaps
On Fri, Oct 16, 2020 at 11:54 PM Jordan Harband <ljharb at gmail.com> wrote:
> Because Object.keys was standardized in 2009, 6 years before Set existed.
> On Fri, Oct 16, 2020 at 6:51 PM #!/JoePea <joe at trusktr.io> wrote:
>> Sets are faster, even for tiny lists of four items. See the perf tests
>> (tested in Chrome):
>> es-discuss mailing list
>> es-discuss at mozilla.org
More information about the es-discuss