Accept numbers as path elements
Andarist opened this issue · comments
Mateusz Burzyński commented
This seems like a reasonable input for me. Both ramda & lodash accept it.
var obj = {}
dset(obj, ['foo', 10, 'baz'], 'bar')
Mentioned libraries also handle this by creating an object instead of array (like in my previously reported issue):
var obj = {}
dset(obj, ['foo', 10.2, 'baz'], 'bar')
Luke Edwards commented
So, basically nothing else treats numbers as indices for array creation?
Mateusz Burzyński commented
Every other lib creates arrays for non-negative integers, no matter if they
are represented by numbers or strings
…On Sun, 9 Sep 2018 at 14:38, Luke Edwards ***@***.***> wrote:
So, basically nothing else treats numbers as indices for array creation?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJWMki1HaOI2-biuUB4iAXWJn2rbYWWQks5uZQvPgaJpZM4WgP8j>
.