dotize
dotize copied to clipboard
wishlist
- Reverse method for "convert"
- Custom delimiter symbol eg: -,_
- Arrays convert config ( exclude prototypes, map array to index-like object)
+1 for reverse method
+1 Arrays convert config
I'm willing to start working on the reverse method. Is there a plan of attack that I should consider?
- exclude/include Arrays flag
I finally have time to work on them.
- Reverse method for "convert" I'm working on it.
- Custom delimiter symbol eg: -,_ What is this useful for?
- Arrays convert config ( exclude prototypes, map array to index-like object) Can you give an example?
- exclude/include Arrays flag Hmm, what is it for?
@vardars
2.) Can't remember.
3.) { a: [1,2,3,4] } ->
{
'a.0': 1,
'a.1': 2,
'a.2': 3,
'a.3': 4
}
//
{
'a[0]': 1,
'a[1]': 2,
'a[2]': 3,
'a[3]': 4
}
//
{
'a[]': [1,2,3,4]
}
//
{
a: [1,2,3,4]
}
4.) Can't remember
4.) just realized, I meant the same as @lifeart but did not see there could be more than two options. so kill 4) it's already included in 3.)
I'm willing to start working on the reverse method. Is there a plan of attack that I should consider?
There is a branch for it. I'm not comfortable about the way I use. Maybe we can "attack" with different angle?
- Reverse method for "convert" is done with release 0.3.0 :)
for 3.) maybe useful: my dirty fix for my personal use case:
https://gist.github.com/machinaeXphilip/7796b362f8fe0310aa31bd0df85ca95a
disclaimer: i did not spent a lot of time thinking here, but merely blindly modded and commented out, so there will be a lot of issues with it.
edited the gist linked above to match dotized 0.3.0 and made edit comments less aggressive.
convert() does { a: [1,2,3,4] } -> { a: [1,2,3,4] }
and seems to work out of the box with backward()
convert() does
{ a: [1,2,3,4] }->{ a: [1,2,3,4] }
This worked like a charm for Cloud Firestore updates, thank you!