{"name":"process-exists","version":"4.1.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":"sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["process","processes","proc","ps","pid","test","testing","exists","running","check"],"dependencies":{"ps-list":"^6.3.0"},"devDependencies":{"ava":"^2.4.0","noop-process":"^4.0.0","tsd":"^0.11.0","xo":"^0.25.0"},"gitHead":"72eb9927b3f2dff32b3ea46b203b5acbe22781cb","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists#readme","_id":"process-exists@4.1.0","_nodeVersion":"16.2.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-BBJoiorUKoP2AuM5q/yKwIfT1YWRHsaxjW+Ayu9erLhqKOfnXzzVVML0XTYoQZuI1YvcWKmc1dh06DEy4+KzfA==","shasum":"4132c516324c1da72d65896851cdbd8bbdf5b9d8","tarball":"http://registry-npm.ywwl.com/process-exists/download/process-exists-4.1.0.tgz","fileCount":5,"unpackedSize":4672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5/WLCRA9TVsSAnZWagAAJ58P/0qGaQWQ2ZFFKv9pt7gR\nTDRuWbAxvWHe+nvqXKTmRk6FzLGicRNNbOigI0CW7YyaSVtrzPr25cIXOAzV\nz+A9nrHibdCvfwM710stWk2sV7M7DKY9xOD2QJAv66UGz2i1ejGCLCWah4Ia\nusv0lT3ENeYKUj3JVYe1cOX7FDOZdsgjQPZUaNwFCJaVtsp8clVdSDs0HuK4\niPhnK+/Wr+klNqqto4k/7K3qxVMEmbx+lFNy2VLc9EIM8QUDtwESCEpaIDnp\n36XUM82N2QGf/Os3a2eeWdATMJSv/oUdisIikENMK5PVhXgWJWGmiXLlF7wA\nixuXcSa2zBVeaSQj3xxO+Uj9YjGMfAcP1v7X4q8YQLmbVoukegWH4J9pt61B\nG1Q88s5yZ7NNgNjMvYNT0QD31qnr1qaElp+24fRXQ5EBNJefTteQKN+mNWZ6\nJqFQLP+ZdC+fba3+zahQy2XEBxmDsbqo6ZloOchAQEenDM8281wNv+4dWFzH\nDj0AFHJE4LbXplvIfU3QzWb2mk5SRdA9VPFolbRUgKdAU096oXUOG9Ae+AHG\nDzXp/cXttIaYoYdpcQP/NCW9km0VVkVIxHnQh86Ok7F73ZLp07yzwmJVF3AM\ncj1l7ABxzoHC8t7oJYgPgeIyaQ9ZFAtD4DTf24JjhZhDtBBQKi+XgdLwYMfX\ntWQW\r\n=pvio\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFcQptgbcr4ke9FdCeCQUr9QpxzHrYWAUo337KnyJ1UzAiEAk3IauEDaQZe7KKEV2OyXRzLyKBdM5ULSgr9RzAaCVQw="}],"size":1967,"noattachment":false,"key":"/process-exists/-/process-exists-4.1.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_4.1.0_1625814411156_0.7930354964965249"},"_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":1625814411313,"_cnpm_publish_time":1625814411313,"dist-tags":{"latest":"5.0.0"}}