user-home
Get the path to the user home directory
Last updated 5 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install user-home 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.0                                ...           latest (5 years ago)

4 Versions

  • 2.0.0                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 2,876
This Week 55,319
This Month 35,469
Last Day 4,361
Last Week 57,955
Last Month 241,128
Dependencies (1)
Dev Dependencies (2)
Dependents (984)

Copyright 2014 - 2016 © taobao.org |