I think that this is not always guaranteed to work, because
{first: $, middle: $, last: $}
is the same as
{first: $, last: $, middle: $}
... so calling Object.keys() is not necessarily going to use a consistent ordering. I think that is why they have to use the more verbose syntax in the other library.
I think you could do something like:
{first: $.0, middle: $.1, last: $.2}, (f, m, l) => ...
pretty easily, though.
... so calling Object.keys() is not necessarily going to use a consistent ordering. I think that is why they have to use the more verbose syntax in the other library.
I think you could do something like: {first: $.0, middle: $.1, last: $.2}, (f, m, l) => ... pretty easily, though.