homedir

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

MIT 5 个版本
安装
npm install homedir
yarn add homedir
pnpm add homedir
bun add homedir
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

版本列表
0.6.0 2014-11-14
0.5.0 2014-11-14
0.3.0 2014-02-22
0.2.0 2014-02-22
0.1.0 2014-02-22