You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I've managed to implement splitting and joining at dot, although I'm worried about priorities.
Basically, this code right now, when split on the "bar", would split the function's arguments:
foo.bar(x=>x.y).baz
But with the dot splitter, it would split the dot instead. It'd still be possible to split arguments when inside the function call, which feels quite sensible to me, and consistent with the rest of the plugin, so I guess maybe that's fine. Although when splitting on "foo" instead, it splits the method, which is maybe a bit weird. Still, not terrible.
The rule would be: you have to be on the property/method after the dot to split it. Finding a following dot would be way too complicated with any arbitrary expression being there.
I've created a branch with this new functionality: split-js-at-dot. I'd really appreciate it if you could switch to that branch and use it for a while, and let me know if the splitter is "too powerful", stopping you from using other splitters. But if it turns out okay, I can definitely see this being applied to a lot of other languages.
The text was updated successfully, but these errors were encountered: