Wondering what’s next for npm?Check out our public roadmap! »

    ordered-entries

    1.0.0 • Public • Published

    A follyfill (lol) for Object.entries.

    Like Object.keys, Object.entries is not required to reflect property order (which is a real thing since ES2015).

    For a good summary, see this answer to Does ES6 introduce a well-defined order of enumeration for object properties?

    This implementation uses Object.getOwnPropertyNames, which is required to respect property order.

    npm i ordered-entries -S
    orderedEntries({ a: 'yup', b: 'yarp' }) // => [ [ 'a', 'yup' ], [ 'b', 'yarp' ] ]

    License

    WTFPL

    Install

    npm i ordered-entries

    DownloadsWeekly Downloads

    216

    Version

    1.0.0

    License

    WTFPL

    Last publish

    Collaborators

    • avatar