path-absolute
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i path-absolute

Weekly Downloads

79,684

Version

1.0.1

License

MIT

Unpacked Size

3.18 kB

Total Files

5

Last publish

Collaborators

  • zkochan