sodiray / radash

Functional utility library - modern, simple, typed, powerful
https://radash-docs.vercel.app
MIT License
4.18k stars 167 forks source link

`set` should not use array when object key string start with number #357

Open everyx opened 11 months ago

everyx commented 11 months ago
var radash = require("radash")

console.log(JSON.stringify(radash.set({}, 'key.0key2', 'value')))

will output {"key":[]}

but what except is {"key": {"0key2": "value"}}

aleclarson commented 2 months ago

Hi @everyx, this issue has a fix available in radashi@beta today (see #15). An official release is pending. We'd love to have you participate in the discussion and/or development of the radashi-org/radashi fork. 😄