Kévin Tessier 04fab6ba46 install gulp | %!s(int64=6) %!d(string=hai) anos | |
---|---|---|
.. | ||
cli.js | %!s(int64=6) %!d(string=hai) anos | |
index.js | %!s(int64=6) %!d(string=hai) anos | |
license | %!s(int64=6) %!d(string=hai) anos | |
package.json | %!s(int64=6) %!d(string=hai) anos | |
readme.md | %!s(int64=6) %!d(string=hai) anos |
Get the path to the user home directory
$ npm install --save user-home
var userHome = require('user-home');
console.log(userHome);
//=> /Users/sindresorhus
Returns null
in the unlikely scenario that the home directory can't be found.
$ npm install --global user-home
$ user-home --help
Example
$ user-home
/Users/sindresorhus
MIT © Sindre Sorhus