hexo-util
hexo-util copied to clipboard
feat: joinPath()
ref: https://github.com/hexojs/hexo/pull/4479
this enhances path.join()
to convert slash, but this joinPath()
doesn't resolve '../' yet.
Coverage increased (+0.05%) to 97.476% when pulling c1295d6c77a58ecad58c897c1c32db2ea0e00ade on curbengh:join-path into bf42b664e717cbf81f338e8f67aad323797c336e on hexojs:master.
path.resolve() is work?
I mean this joinPath()
doesn't support resolving path yet, perhaps in future if there is a demand, currently it's out of scope.
for now, need to joinPath(resolve(from, to), pathtwo)
.
fixed unit test, ready for review.
@curbengh
Recently I have found a package on npm: https://npm.im/url-join
Have a look?