Your PR #247 works is easy to read as it is, so you can choose to take or leave this PR. But... I noticed some repetition of code, so I wanted to see if I could make it DRYer. I think I did, and in the process was also able to revert back the parsedPath object to its original form. Compared to master it introduces fewer changes than the existing PR. I would have put this in a GitHub PR suggestion, but since it spanned a bunch of changes, I couldn't.
Your PR #247 works is easy to read as it is, so you can choose to take or leave this PR. But... I noticed some repetition of code, so I wanted to see if I could make it DRYer. I think I did, and in the process was also able to revert back the
parsedPath
object to its original form. Compared to master it introduces fewer changes than the existing PR. I would have put this in a GitHub PR suggestion, but since it spanned a bunch of changes, I couldn't.