Node.js `os.userInfo()` ponyfill
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

user-info Build Status

Node.js os.userInfo() ponyfill

Install

$ npm install --save user-info

Usage

const userInfo = require('user-info');

console.log(userInfo());
/*
{
	uid: 501,
	gid: 20,
	username: 'sindresorhus',
	homedir: '/Users/sindresorhus',
	shell: '/bin/zsh'
}
*/

API

See the os.userInfo() docs.

The encoding option is not supported.

License

MIT © Sindre Sorhus