Convert a relative filepath into an absolute one. Useful for normalizing .. and ~/.

absolute(filepath)

Examples

absolute('./index.html') // /home/tim/projects/index.html

absolute('~/.npmrc') // /home/tim/.npmrc

absolute('/tmp/nope/.././file.ext') // /tmp/file.ext