Gathering detailed insights and metrics for pid-port
Gathering detailed insights and metrics for pid-port
Gathering detailed insights and metrics for pid-port
Gathering detailed insights and metrics for pid-port
npm install pid-port
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
143 Stars
20 Commits
7 Forks
5 Watchers
1 Branches
4 Contributors
Updated on Jun 12, 2025
Latest Version
1.0.2
Package Id
pid-port@1.0.2
Unpacked Size
8.87 kB
Size
3.19 kB
File Count
5
NPM Version
10.9.0
Node Version
23.3.0
Published on
Jan 20, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
4
Get the ID of the process that uses a certain port
1npm install pid-port
1import {portToPid} from 'pid-port'; 2 3try { 4 console.log(await portToPid(8080)); 5 //=> 1337 6 7 const pids = await portToPid([8080, 22]); 8 9 console.log(pids.get(8080)); 10 //=> 1337 11 12 console.log(pids.get(22)); 13 //=> 12345 14} catch (error) { 15 console.log(error); 16 //=> 'Could not find a process that uses port `8080`' 17}
Get the process ID for a port.
Returns a Promise<number | undefined>
(integer) with the process ID.
Type: number
(integer)
The port to look up.
Get the process IDs for multiple ports.
Returns a Promise<Map<number, number>>
(integer) with the port as key and the process ID as value.
Type: number[]
(integer)
The ports to look up.
Get the ports for a process ID.
Returns a Promise<Set<number>>
with the ports.
Type: number
The process ID to look up.
Get the ports for multiple process IDs.
Returns a Promise<Map<number, Set<number>>>
with the process ID as the key and the ports as value.
Type: number[]
The process IDs to look up.
Get all ports with their process ID.
Returns a Promise<Map<number, number>>
(integer) with the port as key and the process ID as value.
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
Reason
Found 7/20 approved changesets -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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