tildify
v3.0.0
Published
Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`
Downloads
8,501,246
Maintainers
Readme
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.