crush() doesn't handle dots in property names well
import { crush } from 'radash';
const test = {
prop1: 'value1',
'prop2.sub1': 'value2',
prop3: {
prop4: 'value4',
'prop5.sub2': 'value5'
}
};
console.log(crush(test));
outputs
{
prop1: 'value1',
'prop2.sub1': undefined,
'prop3.prop4': 'value4',
'prop3.prop5.sub2': undefined
}
Whenever there is a dot in a proptery name, the value is undefined. Even is I'm pushing the limits by having the dots in the property names, these's still no reason for the values to be undefined
+1 for this issue. @stefaanv I see you had a PR for this, but it got closed. Was it not working?
@Balvajs no, the repo seems to have been abandonned, unfortunately. A shame really because it's a really good initiative.
@stefaanMLB oh no 😕 Do you know if there is some statement somewhere or more info about abandoning this repo? 2 weeks ago the author made a release, so maybe he could be back 🤞
Hi @Balvajs, this is fixed in the Radashi fork (#95). A lot of other stuff has been added/fixed too.
You can use it today by installing radashi@beta (see changelog here). An official release is pending. If you have any more ideas or feedback, consider sharing it here.