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.
is-online
Advanced tools
Readme
Check if the internet connection is up
Works in Node.js and the browser (with a bundler).
In the browser, there is already navigator.onLine
, but it's useless as it only tells you if there's a local connection, and not whether the internet is accessible.
npm install is-online
import isOnline from 'is-online';
console.log(await isOnline());
//=> true
Type: object
Type: number
Default: 5000
Milliseconds to wait for a server to respond.
Type: number
Values: 4 | 6
Default: 4
The Internet Protocol version to use.
This is an advanced option that is usually not necessary to be set, but it can prove useful to specifically assert IPv6 connectivity.
The following checks are run in parallel:
myip.opendns.com
and o-o.myaddr.l.google.com
DNS entries. (Node.js only)When any check succeeds, the returned Promise is resolved to true
.
To make it work through proxies, you need to set up global-agent
.
FAQs
Check if the internet connection is up
The npm package is-online receives a total of 68,673 weekly downloads. As such, is-online popularity was classified as popular.
We found that is-online demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.