cwdify

0.1.2 • Public • Published

cwdify NPM version

Replace the cwd in an absolute path with the Bash equivalent: ~+. Like untildify, but for cwd instead of userhome.

Install with npm

npm i cwdify --save

Usage

var cwdify = require('cwdify');
 
cwdify('/Users/jonschlinkert/dev/cwdify/foo/bar');
//=> '~+/foo/bar'

Related

  • expand-tilde to expand tilde paths and cwd paths to absolute paths.
  • tildify to replace the user home in an absolute path with a tilde path.
  • untildify for the reverse of tildify.

Run tests

Install dev dependencies:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on January 20, 2015.

Package Sidebar

Install

npm i cwdify

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • doowb
  • jonschlinkert