lukeed/dset

Accept numbers as path elements

Andarist opened this issue · 2 comments

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')

So, basically nothing else treats numbers as indices for array creation?