{"name":"passwd-user","version":"3.0.0","description":"Get the passwd user entry from a username or user identifier (UID)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/passwd-user.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["passwd","linux","macos","osx","uid","gid","pw","getpwuid","posix","unix","shell","home","dir","username","user","etc","password","passwords","identifier"],"dependencies":{"execa":"^1.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"3b011c15a43202f14b2dde1db64e35f90dcaed29","bugs":{"url":"https://github.com/sindresorhus/passwd-user/issues"},"homepage":"https://github.com/sindresorhus/passwd-user#readme","_id":"passwd-user@3.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Iu90rROks+uDK00ppSewoZyqeCwjGR6W8PcY0Phl8YFWju/lRmIogQb98+vSb5RUeYkONL3IC4ZLBFg4FiE0Hg==","shasum":"cb164c7cec4636ecbdffeb6ba369bf109654b068","tarball":"http://registry-npm.ywwl.com/passwd-user/download/passwd-user-3.0.0.tgz","fileCount":5,"unpackedSize":9247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyUOaCRA9TVsSAnZWagAAdBMP/0ZgbHtqeb09YRtTQF0N\nC4zqTnMt2Ko9+t7bKf8arS5nHwf7T6+BGKVK2e2QXQ5zYtT/XA6//ON0ntov\n3PQSeQOcuTr8Zh37AcHZ5St3xocGNAQwqmoqFKz7qcOCCnH4ZPbfMKQPqUJd\nff7HFjB5XbGy9eTOmHIJFpSGUi0vDFd8IW90NHUiZOQEwviPfYbCMRFgGV+l\nPKvQzg5JBUPQusRPepFe2T5aTDXOhuiWmbVZuEK7mHb7qDArGBeprWK8hNq/\nx2y06TRbioLtqoa6BvvAbspsB0JU6DGMV21U4TFHVenVE2rHALi1NB3dLHfY\n3OHaVV/dUXfmwM7r63UXCYcju9cZ5lk2blayasbFF66RarqR3PxKVXN+lFkW\ncWKZsEeOrgjlldzCSPulQFI0ruQ8HAO465rQz+VOq3raMWYBAIH8ebjG955Y\npKdiShxMeb3Mt6Y20hIpFk16fiJ6KCYiyosXZrBlmfwiclOtWQDXM9530lhp\nalsl4lVGX2GuAVIE2F6U0ilT3H1Ya+swpTa9o3xQuZJ2iaB9KKd93AdT4alt\n6lkyP0nMkVK6MkWXcDkkuAsgeVzglM1UJ9EyBD8wmTLMNzm5roM7yOtthelP\nWATlR86hkAtTcDTO6Nu5Jmk7AapOetprLIHCCOERGZEOawkYwD3AZUO7np1q\ntO1L\r\n=5Xuz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFzfjz8SPixtNd19NP71SgQ9xYoWSh76QSn8lFUujPhdAiEA+1YlsBYRuZlF9vRzfYWsTLGFhJ8saHohJaAwe1v9RkY="}],"size":3141,"noattachment":false,"key":"/passwd-user/-/passwd-user-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passwd-user_3.0.0_1556693914168_0.15346295368597906"},"_hasShrinkwrap":false,"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":1556693914283,"_cnpm_publish_time":1556693914283,"dist-tags":{"latest":"4.0.0"}}