nicki

6.1.1 • Public • Published

Nicki License NPM version Dependency Status Build Status

Get names of users by uids from /etc/passwd (or from dscl on darwin).

Install

npm i nicki --save

Hot to use?

const nicki = require('nicki');
const names = await nicki();

/*
 * Could be something like this
{
  '0': 'root',
  '1': 'daemon',
  '2': 'bin',
  '3': 'sys',
  '4': 'sync',
  '5': 'games',
  '6': 'man',
  '7': 'lp',
  '8': 'mail',
  '9': 'news',
  '10': 'uucp',
  '13': 'proxy',
  '33': 'www-data',
  '34': 'backup',
  '38': 'list',
  '39': 'irc',
  '41': 'gnats',
  '100': 'libuuid',
  '101': 'syslog',
  '102': 'messagebus',
  '103': 'landscape',
  '104': 'sshd',
  '105': 'colord',
  '106': 'debian-deluged',
}
*/

How it works?

Nicki parses /etc/passwd and makes object where key is uid and value is name.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 6.1.1
    290
    • latest

Version History

Package Sidebar

Install

npm i nicki

Weekly Downloads

352

Version

6.1.1

License

MIT

Unpacked Size

8.32 kB

Total Files

6

Last publish

Collaborators

  • coderaiser