user-info

Node.js `os.userInfo()` ponyfill

MIT 4 个版本
安装
npm install user-info
yarn add user-info
pnpm add user-info
bun add user-info
README

Deprecated

This package is no longer relevant as Node.js 4 is unmaintained.


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

版本列表
2.0.0 2018-11-08
1.0.0 2016-09-30
0.1.1 2016-07-14
0.1.0 2016-04-14