{"name":"passwd-user","version":"0.1.0","description":"Get the passwd user entry from a username or uid","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/passwd-user"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["passwd","uid","gid","pw","getpwuid","posix","unix","shell","home","dir","username","user","etc","password","passwords"],"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/passwd-user/issues"},"homepage":"https://github.com/sindresorhus/passwd-user","_id":"passwd-user@0.1.0","dist":{"shasum":"fbfd0ea16fe6a042bd2d8ed3210296791ecaae99","tarball":"http://registry-npm.ywwl.com/passwd-user/download/passwd-user-0.1.0.tgz","integrity":"sha512-XDGikpweicaRzc56HGX4am4g1OKLz/jc1NcVOyHM5+bw8S/0VTIPZMLCRPVsy9Ph3r5AXp8bINyQUXmgiKUs9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBv5zyYX3EtKh3dv23mAVI0KeRRVQhodv594sA1eu+9QIgYN0/RcflmT3bTkOAJeB2uJDCEg8gK2+4NYgQ55VaR1I="}],"size":1363,"noattachment":false,"key":"/passwd-user/-/passwd-user-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"readme":"# passwd-user\n\n> Get the [passwd](https://en.wikipedia.org/wiki/Passwd) user entry from a username or [user identifier (UID)](https://en.wikipedia.org/wiki/User_identifier_(Unix))\n\nWorks on macOS and Linux. See [`user-info`](https://github.com/sindresorhus/user-info) if you need cross-platform support.\n\n## Install\n\n```sh\nnpm install passwd-user\n```\n\n## Usage\n\n```js\nimport {passwdUser} from 'passwd-user';\n\nconsole.log(await passwdUser('sindresorhus'));\n/*\n{\n\tusername: 'sindresorhus',\n\tpassword: '*',\n\tuserIdentifier: 501,\n\tgroupIdentifier: 20,\n\tfullName: 'Sindre Sorhus',\n\thomeDirectory: '/home/sindresorhus',\n\tshell: '/bin/zsh'\n}\n*/\n\nawait passwdUser(501);\nconsole.log('Got entry for user 501');\n\nconst user = await passwdUser();\nconsole.log(`Got entry for user ${user.userIdentifier}`);\n```\n\n## API\n\nReturns an object with:\n\n- `username`\n- `password`\n- `userIdentifier`: [UID](https://en.wikipedia.org/wiki/User_identifier)\n- `groupIdentifier`: [GID](https://en.wikipedia.org/wiki/Group_identifier)\n- `fullName`: Name of user\n- `homeDirectory`: Home directory\n- `shell`: Default shell\n\n### passwdUser(username?)\n### passwdUser(userIdentifier?)\n\nReturns a `Promise<object>` with the user entry.\n\n### passwdUserSync(username?)\n### passwdUserSync(userIdentifier?)\n\nReturns an `object` with the user entry.\n\n#### username\n\nType: `string`\n\nThe username to look up.\n\n#### userIdentifier\n\nType: `number`\\\nDefault: [`process.getuid()`](https://nodejs.org/api/process.html#process_process_getuid) (The current user)\n\nThe [user identifier (UID)](https://en.wikipedia.org/wiki/User_identifier) to look up.\n\n## Related\n\n- [username](https://github.com/sindresorhus/username) - Get the user's username *(cross-platform)*\n- [fullname](https://github.com/sindresorhus/fullname) - Get the user's fullname *(cross-platform)*\n","publish_time":1398687647790,"_cnpm_publish_time":1398687647790,"dist-tags":{"latest":"4.0.0"}}