path-cwd

Get a path in the cwd


Keywords
resolve, get, path, home, dir, user
License
MIT
Install
npm install path-cwd@1.1.0

Documentation

path-cwd

Get a path in the cwd

Unlike the resolve-* these modules allow resolution of non-module paths.

Install

npm install --save path-cwd
yarn add path-cwd

Import

// ES2015
import cwd from 'path-cwd'
// CommonJS
var cwd = require('path-cwd')

Usage

cwd([path]) : String

Get a path in the cwd.

  • path {String} (optional) path to get in the cwd

Returns a string.

Example

import cwd from 'path-cwd'

cwd('pineapple') //=> C:/User/Spongebob Squarepants/projects/bikini-bottom/pineapple

See also

Contributing

All pull requests and issues welcome!

If you're not sure how, check out the great video tutorials on egghead.io!

License

MIT © Sam Gluck