JSPM

path-absolute

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 131225
  • Score
    100M100P100Q160153F
  • License MIT

Resolves a path to an absolute path. Supports tilde

Package Exports

  • path-absolute

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (path-absolute) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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