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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    91,377
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    91,377
  • 1.0.0
    22
  • 0.0.0
    7

Package Sidebar

Install

npm i path-absolute

Weekly Downloads

91,406

Version

1.0.1

License

MIT

Unpacked Size

3.18 kB

Total Files

5

Last publish

Collaborators

  • zkochan