to-absolute-path
v1.0.0
Published
Transform any path to an absolute path depending on your call stack
Downloads
104
Readme
to-absolute-path
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