{"name":"process-exists","version":"5.0.0","description":"Check if a process is running","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/process-exists.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["process","processes","proc","ps","pid","test","testing","exists","running","check"],"dependencies":{"ps-list":"^8.0.0"},"devDependencies":{"ava":"^3.15.0","noop-process":"^5.0.0","tsd":"^0.18.0","xo":"^0.46.4"},"types":"./index.d.ts","gitHead":"0c7bc2319d00b334b3b779d5c8aa3b0bf64122b1","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists#readme","_id":"process-exists@5.0.0","_nodeVersion":"12.22.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-6QPRh5fyHD8MaXr4GYML8K/YY0Sq5dKHGIOrAKS3cYpHQdmygFCcijIu1dVoNKAZ0TWAMoeh8KDK9dF8auBkJA==","shasum":"0b6dcd3d19e85e1f72c633f56d38e498196e2855","tarball":"http://registry-npm.ywwl.com/process-exists/download/process-exists-5.0.0.tgz","fileCount":5,"unpackedSize":5033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh23PICRA9TVsSAnZWagAAvl8P/iWhhNfa8ji58BlLOvye\n97QJNEYCcFJHOk2KTCZRFQnI6c+Ec6ptaN6ayT189iB54ZAWICujgkDSnUx9\n/DBhgWR+45p0pDd8ijuBMCnTiOM16GtQ5O+WVIS7TOk0Dn1Ry2idRI+bh7zL\nRz4qukeRAsqBsRR1LbtqsWq9R5pWdHXOhSl5iKlYjcaRCIMMCa98c0GA6BSk\nd5lh31j6mguiO4SrB3ig+URc4OTtL4B86AEW29N7oeD/zGOgloURMDN15hFt\n1MbdE0Kpvi8UgcIu9z9X8hGq/HV7IHSVk8aqVep6+qRZpqP7fYzh75fcK3xD\nbUGwLU33Qh+bkI6Gs5C6PI4smeJG2X2Z2aZ3a8JCDWW46fnbnVZnALcPy4ng\n7KbGjR1XvUheRm0gUBUIcDlUnDrURnoxT+uWXLU8Zbgm1cfxG4QaZOPnICY8\nYuEkkjaggA729zhsbII8iz+fqWYTGhZ6Yzjx5IOCpsSzYmmE9jAtoQvB/pzj\nyBK33bwudaKVaSGonOYMMy+mlXUIvxJk/oDsux+aMXZpTKQgjnE8hui4PHho\nJLivrXpbgdAsKlfqZIdsITcKtVtXuUgUPNEuAb+f7AI+kmHGuWcShhYXE4tB\nXYSQkQpLsEV5KN+AZiOS4D8PVfX1jbmaLLpnpDC84M26WlY7kueUskDWMQba\nMyHI\r\n=Nctg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBO2ndwwWoOxyM1kPvYcSJRkjl5Hmw7hIpdOuoTj0VmUAiBSSZ3/PTrIPlUlBEh1vlqv7Jb60iXV3EFq1Ku1nGdy7A=="}],"size":2026,"noattachment":false,"key":"/process-exists/-/process-exists-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/process-exists_5.0.0_1636034014510_0.3038755975586198"},"_hasShrinkwrap":false,"readme":"# process-exists\n\n> Check if a process is running\n\n## Install\n\n```sh\nnpm install process-exists\n```\n\n## Usage\n\n```js\nimport {processExists, processExistsMultiple, filterExistingProcesses} from 'process-exists';\n\nconsole.log(await processExists(process.pid));\n//=> true\n\nconst exists = await processExistsMultiple([process.pid, 'foo']);\n\nconsole.log(exists.get(process.pid));\n//=> true\n\nconsole.log(exists.get('foo'));\n//=> false\n\nconsole.log(filterExistingProcesses(exists));\n//=> [process.pid]\n```\n\n## API\n\n### processExists(input)\n\nCheck if a process exists.\n\nReturns a `Promise<boolean>`.\n\n#### input\n\nType: `number | string`\n\nThe process ID or name to check.\n\n### processExistsMultiple(input)\n\nCheck multiple processes if they exist.\n\nReturns a `Promise<Map>` with the process name/ID as key and the status as a boolean value.\n\n#### input\n\nType: `Array<number | string>`\n\nThe process IDs or names to check.\n\n### filterExistingProcesses(input)\n\nFilter processes that exist.\n\nReturns an `Array<number | string>` with the processes that exist.\n\n#### input\n\nType: `Array<number | string>`\n\nThe process IDs or names to check.\n","publish_time":1636034014665,"_cnpm_publish_time":1636034014665,"dist-tags":{"latest":"5.0.0"}}