path-cwd

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i path-cwd

Weekly Downloads

4

Version

1.1.0

License

MIT

Last publish

Collaborators

  • sdgluck