Prepend the CWD to a path
Use this if you need a path to always be absolute, but the input you're getting could be relative or absolute.
npm install prepend-cwd
const cwd = ;; // => /Users/geoff/sites/project/cat.png// => /Users/geoff/sites/project/cat.png
Prepend the current working directory to a path, unless the path is absolute, in which case return it as-is.
- path (String): path to prepend to.
Returns absolute path.
git clone https://github.com/gakimball/prepend-cwdcd prepend-cwdnpm installnpm test
MIT © Geoff Kimball