@brillout/relative-to-homedir

<!---

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Apr 23, 2018Mar 7, 2018Minified + gzip package size for @brillout/relative-to-homedir in KB

Readme

Make a path relative to the home directory

Usage Example

// /example.js

const relative_to_homedir = require('.');
const assert = require('assert');
const os = require('os');

const path = os.homedir()+'/path/to/something';

const path__relative_to_home_dir = relative_to_homedir(path);
console.log(path__relative_to_home_dir);
assert(path__relative_to_home_dir==='~/path/to/something');

Running /example.js will print ~/path/to/something

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.