user-home
Get the path to the user home directory
Last updated 10 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ 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

  • 3.0.0                                ...           latest (4 years ago)

3 Versions

  • 3.0.0 [deprecated]           ...           4 years ago
  • 2.0.0                                ...           10 years ago
  • 1.1.1                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org