An open API service indexing awesome lists of open source software.

https://github.com/marcbachmann/resolve-basepath

`resolve-basepath` extends node's `path.resolve` with a base path feature.
https://github.com/marcbachmann/resolve-basepath

Last synced: 8 months ago
JSON representation

`resolve-basepath` extends node's `path.resolve` with a base path feature.

Awesome Lists containing this project

README

          

# resolve-basepath

`resolve-basepath` extends node's `path.resolve` with a base path feature.

```js
// default node path.resolve
var resolve = require('resolve-basepath')
resolve('foo', 'bla') // returns '/currentdir/foo/bla'

// path.resolve with a base path
var resolve2 = require('resolve-basepath').base(__dirname)
resolve2('foo', 'bla') // returns '/directoryOfScript/foo/bla'

// path.resolve with multiple base paths
var resolve2 = require('resolve-basepath').base(__dirname, 'foo')
resolve2('bla') // returns '/directoryOfScript/foo/bla'
```