to-absolute-path

1.0.0 • Public • Published

to-absolute-path Build StatusCoverage Status

Transform any path to an absolute path depending on your call stack

Install

$ npm install --save to-absolute-path

Usage

var toAbsolutePath = require('to-absolute-path');
 
toAbsolutePath('file.txt');
//=> c:/folder/subfolder/file.txt

API

toAbsolutePath(paths, [depth])

paths

Required
Type: Array, string

the path(s) to convert in to absolute one a path can be a negative path (starting with !)

depth

Type: int
Default: 0

Depth in the function call stack. ie: from which file/function the input paths are relative to

License

MIT © Thomas Sileghem

Readme

Keywords

none

Package Sidebar

Install

npm i to-absolute-path

Weekly Downloads

9

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mastilver