Attempt to resolve the absolute filepath to a file and verify that it exists.
npm install lookup-path> Attempt to resolve the absolute filepath to a file and verify that it exists.
You might also be interested in is-absolute.
Install with npm:
``sh`
$ npm i lookup-path --save
`js
var lookup = require('lookup-path');
console.log(lookup('package.json'));
//=> '~/package.json'
// pass a cwd as a second parameter
lookup('foo.js', 'test');
`
* is-absolute: Returns true if a file path is absolute. | homepage
* is-relative: Returns true if the path appears to be relative. | homepage
* is-windows: Returns true if the platform is windwows. | homepage
Install dev dependencies:
`sh``
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
* github/jonschlinkert
* twitter/jonschlinkert
Copyright © 2016 Jon Schlinkert
Released under the MIT license.
*
_This file was generated by verb, v0.9.0, on February 07, 2016._