Get the current working directory relative to the calling module.
MIT License
Easily get the CWD (current working directory) of a project based on package.json, optionally starting from a given path. (node.js/javascript util)
Install with npm:
$ npm install cwd --save
var cwd = require('cwd');
cwd();
cwd('one/two.js');
cwd('one', 'two.js');
cwd(['one', 'two.js']);
You might also be interested in these projects:
path.isAbolute
. Returns true if a file path is absolute. | homepage
true
if the path appears to be relative. | homepage
This document was generated by verb, please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install -g verb verb-readme-generator && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on June 05, 2016.