Skip to content

Could this be an Object.keys() option? #4

@eemeli

Description

@eemeli

Rather than introducing a new method, could the proposal instead be about adding a second argument to Object.keys()? As in:

const a = [13, 42]
a.foo = 99

Object.keys(a) // [ '0', '1', 'foo' ]
Object.keys(a, { numeric: true }) // [ '0', '1' ]
Object.keys(a, { numeric: false }) // [ 'foo' ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions