Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

user-home

2.0.0 • Public • Published

user-home Build Status

Get the path to the user home directory

Install

$ npm install --save user-home

Usage

var userHome = require('user-home');
 
console.log(userHome);
//=> '/Users/sindresorhus'

Returns null in the unlikely scenario that the home directory can't be found.

Related

  • user-home-cli - CLI for this module
  • home-or-tmp - Get the user home directory with fallback to the system temp directory

License

MIT © Sindre Sorhus

install

npm i user-home

Downloadsweekly downloads

2,720,689

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar