Skip to content

Convert an absolute path to tilde path: /Users/sindresorhus/dev => ~/dev

License

Notifications You must be signed in to change notification settings

sindresorhus/tildify

tildify

Convert an absolute path to a tilde path: /Users/sindresorhus/dev~/dev

Install

$ npm install tildify

Usage

import tildify from 'tildify';

tildify('/Users/sindresorhus/dev');
//=> '~/dev'

Related

See untildify for the inverse.

About

Convert an absolute path to tilde path: /Users/sindresorhus/dev => ~/dev

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5