Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

homedir

wilmoore290.4kMIT0.6.0

Platform agnostic user home directory path resolution for Node.js.

userhome, user, home, homedir, home_dir, passwd(5), username, userpath

readme

homedir

Build Status NPM version NPM downloads LICENSE

Platform agnostic user home directory path resolution (i.e. man 5 passwd) for Node.js.

The user's home directory. This is the full path name where the user will be placed on login.

OSX

homedir();
#=> /Users/wilmoore

homedir('Guest');
#=> /Users/Guest

Windows

homedir();
#=> C:\Users\wilmoore

homedir('Public');
#=> C:\Users\Public

Linux

homedir();
#=> /home/wilmoore

homedir('guest');
#=> /home/guest

Installation

npm install homedir --save

Alternatives

License

MIT

changelog

0.3.0 / 2014-02-21

  • first stable release.