1.0.1 • Published 5 years ago

path-absolute v1.0.1

Weekly downloads
1,151
License
MIT
Repository
github
Last release
5 years ago

path-absolute

Resolves a path to an absolute path. Supports tilde

npm version

Installation

npm i -S path-absolute

Usage

const pathAbsolute = require('path-absolute')

pathAbsolute('~/foo')
//> '/home/zkochan/foo'

pathAbsolute('/foo/bar')
//> '/foo/bar'

pathAbsolute('./foo/bar', '/home')
//> '/home/foo/bar'

API

pathAbsolute(path, [cwd]): string

Resolves a path to an absolute path

License

MIT © Zoltan Kochan