Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Check if the internet connection is up
Works in Node.js and the browser (with a bundler).
In the browser you have 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
const isOnline = require('is-online');
(async () => {
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
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 70,845 weekly downloads. As such, is-online popularity was classified as popular.
We found that is-online demonstrated a healthy version release cadence and project activity because the last version was released less than 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.