{"_id":"process-exists","_rev":"1394581","name":"process-exists","description":"Check if a process is running","dist-tags":{"latest":"5.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-11-04T13:56:04.000Z","created":"2015-06-20T19:42:50.161Z","5.0.0":"2021-11-04T13:53:34.665Z","4.1.0":"2021-07-09T07:06:51.313Z","4.0.0":"2019-12-22T17:28:29.207Z","3.1.0":"2018-03-01T17:51:58.630Z","3.0.0":"2017-08-28T00:12:15.314Z","2.1.0":"2015-10-18T20:44:12.465Z","2.0.0":"2015-10-17T21:22:38.700Z","1.0.0":"2015-06-20T19:42:50.161Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/process-exists.git"},"versions":{"5.0.0":{"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":{"shasum":"0b6dcd3d19e85e1f72c633f56d38e498196e2855","size":2026,"noattachment":false,"key":"/process-exists/-/process-exists-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/process-exists_5.0.0_1636034014510_0.3038755975586198"},"_hasShrinkwrap":false,"publish_time":1636034014665,"_cnpm_publish_time":1636034014665},"4.1.0":{"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":{"shasum":"4132c516324c1da72d65896851cdbd8bbdf5b9d8","size":1967,"noattachment":false,"key":"/process-exists/-/process-exists-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-4.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/process-exists_4.1.0_1625814411156_0.7930354964965249"},"_hasShrinkwrap":false,"publish_time":1625814411313,"_cnpm_publish_time":1625814411313},"4.0.0":{"name":"process-exists","version":"4.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":"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":"8a82519fc268f2dd7d6a6d45c3f058f159523654","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists#readme","_id":"process-exists@4.0.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"dc12d87798c17b3f129f716631e2ccdaf240b4ab","size":1969,"noattachment":false,"key":"/process-exists/-/process-exists-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/process-exists_4.0.0_1577035709057_0.6870012319138306"},"_hasShrinkwrap":false,"publish_time":1577035709207,"_cnpm_publish_time":1577035709207},"3.1.0":{"name":"process-exists","version":"3.1.0","description":"Check if a process is running","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/process-exists.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["process","processes","proc","ps","pid","test","testing","exists","running","check"],"dependencies":{"ps-list":"^4.0.0"},"devDependencies":{"ava":"*","noop-process":"^3.0.0","xo":"*"},"gitHead":"d39a601d3eb57ca748c89c151c526f5ddcadde09","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists#readme","_id":"process-exists@3.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"86cae049e1e7b51382690ec9fd8dfd74ff7a17c8","size":1732,"noattachment":false,"key":"/process-exists/-/process-exists-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/process-exists_3.1.0_1519926718457_0.15633202552212522"},"_hasShrinkwrap":false,"publish_time":1519926718630,"_cnpm_publish_time":1519926718630},"3.0.0":{"name":"process-exists","version":"3.0.0","description":"Check if a process is running","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/process-exists.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["process","processes","proc","ps","pid","test","testing","exists","running","check"],"dependencies":{"ps-list":"^4.0.0"},"devDependencies":{"ava":"*","noop-process":"^3.0.0","xo":"*"},"gitHead":"b3ba904ded6c6cfd6cf464c11eb5aeb0441722af","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists#readme","_id":"process-exists@3.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"75cf6b47a12721c9b4c06880e091da95717ded81","size":1541,"noattachment":false,"key":"/process-exists/-/process-exists-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/process-exists-3.0.0.tgz_1503879134935_0.4591879863291979"},"directories":{},"publish_time":1503879135314,"_hasShrinkwrap":false,"_cnpm_publish_time":1503879135314},"2.1.0":{"name":"process-exists","version":"2.1.0","description":"Check if a process is running","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/process-exists"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["process","proc","ps","proc","pid","test","testing","exists","running","check"],"dependencies":{"ps-list":"^3.0.0"},"devDependencies":{"ava":"*","noop-process":"^3.0.0","xo":"*"},"xo":{"ignores":["test.js"]},"gitHead":"ba5b30904f7511f691bffd8a872d7e1e458fcae6","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists","_id":"process-exists@2.1.0","_shasum":"718c612887e787d54fac109bf4e67b18013746b8","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"718c612887e787d54fac109bf4e67b18013746b8","size":1602,"noattachment":false,"key":"/process-exists/-/process-exists-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1445201052465,"_cnpm_publish_time":1445201052465,"_hasShrinkwrap":false},"2.0.0":{"name":"process-exists","version":"2.0.0","description":"Check if a process is running","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/process-exists"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["process","proc","ps","proc","pid","test","testing","exists","running","check"],"dependencies":{"pify":"^2.2.0","pinkie-promise":"^1.0.0","ps-list":"^2.0.0"},"devDependencies":{"ava":"*","noop-process":"^2.0.0","xo":"*"},"xo":{"ignores":["test.js"]},"gitHead":"2f038a41ed032f7495184b475c11b7429fde68cf","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists","_id":"process-exists@2.0.0","_shasum":"5a88bdd2913d531e6a68f50695df5afcb11d0364","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5a88bdd2913d531e6a68f50695df5afcb11d0364","size":1656,"noattachment":false,"key":"/process-exists/-/process-exists-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1445116958700,"_cnpm_publish_time":1445116958700,"_hasShrinkwrap":false},"1.0.0":{"name":"process-exists","version":"1.0.0","description":"Check if a process is running","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/process-exists"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["process","proc","ps","proc","pid","test","testing","exists","running","check"],"dependencies":{"ps-list":"^2.0.0"},"devDependencies":{"ava":"0.0.4","noop-process":"^1.0.1"},"gitHead":"2bcb6560d010c7038315e63269bc9746250757cd","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"homepage":"https://github.com/sindresorhus/process-exists","_id":"process-exists@1.0.0","_shasum":"3e41db81e00b4f6f744446f601022142d3249161","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3e41db81e00b4f6f744446f601022142d3249161","size":1599,"noattachment":false,"key":"/process-exists/-/process-exists-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/process-exists/download/process-exists-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1434829370161,"_cnpm_publish_time":1434829370161,"_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","_attachments":{},"homepage":"https://github.com/sindresorhus/process-exists#readme","bugs":{"url":"https://github.com/sindresorhus/process-exists/issues"},"license":"MIT"}