{"name":"passwd-user","version":"1.2.1","description":"Get the passwd user entry from a username or uid","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/passwd-user"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["passwd","linux","osx","uid","gid","pw","getpwuid","posix","unix","shell","home","dir","username","user","etc","password","passwords"],"dependencies":{"exec-file-sync":"^2.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"81fd63ac1abb524e3c4cb03c18e7f0ea8097c740","bugs":{"url":"https://github.com/sindresorhus/passwd-user/issues"},"homepage":"https://github.com/sindresorhus/passwd-user","_id":"passwd-user@1.2.1","_shasum":"a01a5dc639ef007dc56364b8178569080ad3a7b8","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a01a5dc639ef007dc56364b8178569080ad3a7b8","tarball":"http://registry-npm.ywwl.com/passwd-user/download/passwd-user-1.2.1.tgz","integrity":"sha512-0Ha7cu6j5fjh1BZuh0dutqkv350qp6iJvFQuKy8C4cAW/hDscAOWsVv0K7PoT2FCofN8n/7LDqKbTW3kwScOUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEqYv3Q08Q0io+HKT3zgjK5lwgHKBLUjv9UN/h6M3NgAIhAJWDxvLMpP/2nq8lI1f18j9NtDIJfrmL7l4aFRsKucr9"}],"size":2563,"noattachment":false,"key":"/passwd-user/-/passwd-user-1.2.1.tgz"},"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":1437005389235,"_cnpm_publish_time":1437005389235,"dist-tags":{"latest":"4.0.0"}}