Allow second positional argument to be a string
Related to #4 (closed), this helper should allow the base argument (String) to be specified as the second positional argument. This accomplishes two things:
- It retains at least partial backwards compatibility with the API prior to #4 (closed) (only the lesser used dot argument wouldn't be recognized)
- It simplifies the API when you only need to specify a path and base path (thus matching the File.expand_path function from Ruby)
The idea is if you're only resolving paths relative to a base directory, you can use:
expandPath('file.ext', '/base/dir')
When you need more control over the context, then you can switch to using options:
expandPath('./file.ext', { base: '/base/dir', dot: '/dot/dir' })
This enhancement can be made with no measurable overhead.