Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@00a/util.os
Advanced tools
Readme
这是一个关于 操作系统 的功能插件集合
$ yarn add @00a/util.os
const { isWin, isMac, isLinux } = require("@00a/util.os");
isLinux();
const { getPort, killPorts, getPortsPids } = require("@00a/util.os");
// 获取一个随机可用端口
getPort().then((port) => console.log(port));
// 如果8080可用,则获取,否则,随机一个端口
getPort(8080).then((port) => console.log(port));
// 强制获取端口8080, 即使目前被占用
getPort(8080, true).then((port) => console.log(port));
// 杀掉8080端口,返回对应pid:1234, 未被占用则是-1
killPorts(8080).then((pid) => console.log(pid));
// 杀掉8080、3000端口,返回对应pid数组:[1234, 5678], 未被占用则是[-1, -1]
killPorts([8080, 3000]).then((pids) => console.log(pids));
// 获取端口对应的pid, 未被占用则是-1
getPortsPids(8080).then((pid) => console.log(pid));
// 获取端口对应的pid数组:[1234, 5678], 未被占用则是[-1, -1]
getPortsPids([8080, 3000]).then((pids) => console.log(pids));
@00a/util.os
严格遵循 Semantic Versioning 2.0.0 语义化版本规范。
2020-07-18
2020-07-17
getPort
方法killPorts
方法getPortsPids
方法2020-07-07
isWin
方法isMac
方法isLinux
方法FAQs
The npm package @00a/util.os receives a total of 2 weekly downloads. As such, @00a/util.os popularity was classified as not popular.
We found that @00a/util.os demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.