Installations
npm install process-exists
Developer Guide
Typescript
Yes
Module System
ESM
Min. Node Version
^12.20.0 || ^14.13.1 || >=16.0.0
Node Version
12.22.1
NPM Version
8.1.0
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (82.9%)
TypeScript (17.1%)
Developer
sindresorhus
Download Statistics
Total Downloads
46,847,086
Last Day
34,697
Last Week
172,492
Last Month
808,853
Last Year
9,459,407
GitHub Statistics
58 Stars
27 Commits
4 Forks
7 Watching
1 Branches
6 Contributors
Bundle Size
2.99 kB
Minified
1.28 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
5.0.0
Package Id
process-exists@5.0.0
Size
1.98 kB
NPM Version
8.1.0
Node Version
12.22.1
Publised On
04 Nov 2021
Total Downloads
Cumulative downloads
Total Downloads
46,847,086
Last day
-4.9%
34,697
Compared to previous day
Last week
-17.8%
172,492
Compared to previous week
Last month
1.8%
808,853
Compared to previous month
Last year
24.4%
9,459,407
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
4
process-exists
Check if a process is running
Install
1npm install process-exists
Usage
1import {processExists, processExistsMultiple, filterExistingProcesses} from 'process-exists'; 2 3console.log(await processExists(process.pid)); 4//=> true 5 6const exists = await processExistsMultiple([process.pid, 'foo']); 7 8console.log(exists.get(process.pid)); 9//=> true 10 11console.log(exists.get('foo')); 12//=> false 13 14console.log(filterExistingProcesses(exists)); 15//=> [process.pid]
API
processExists(input)
Check if a process exists.
Returns a Promise<boolean>
.
input
Type: number | string
The process ID or name to check.
processExistsMultiple(input)
Check multiple processes if they exist.
Returns a Promise<Map>
with the process name/ID as key and the status as a boolean value.
input
Type: Array<number | string>
The process IDs or names to check.
filterExistingProcesses(input)
Filter processes that exist.
Returns an Array<number | string>
with the processes that exist.
input
Type: Array<number | string>
The process IDs or names to check.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
Found 7/24 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/process-exists/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/process-exists/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:22
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 10 are checked with a SAST tool
Score
3.6
/10
Last Scanned on 2025-01-20
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More