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.
Convert an absolute path to a tilde path:
/Users/sindresorhus/dev
→~/dev
$ npm install tildify
import tildify from 'tildify';
tildify('/Users/sindresorhus/dev');
//=> '~/dev'
See untildify for the inverse.
npm i tildify
1,823,913
3.0.0
MIT
2.88 kB
5