tildify
Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`
Last updated 9 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tildify 
SYNC missed versions from official npm registry.

tildify Build Status

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

Install

$ npm install tildify

Usage

const tildify = require('tildify');

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

Related

See untildify for the inverse.

License

MIT © Sindre Sorhus

Current Tags

  • 2.0.0                                ...           latest (9 months ago)

8 Versions

  • 2.0.0                                ...           9 months ago
  • 1.2.0                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 48
This Week 1,909
This Month 66,320
Last Day 970
Last Week 7,767
Last Month 110,462
Dependencies (0)
None
Dev Dependencies (3)
Dependents (537)

Copyright 2014 - 2016 © taobao.org |