1.0.0 • Published 9 years ago

to-absolute-path v1.0.0

Weekly downloads
71
License
MIT
Repository
github
Last release
9 years ago

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