Is Online
Check if the internet connection is up
Is Online is a JavaScript package that checks whether a device can actually reach the internet rather than merely having a local network connection. It works in Node.js and modern browsers when bundled. The function returns a promise that resolves to a simple online or offline Boolean result. Developers can set a timeout, cancel a check through AbortSignal, and choose IPv4 or IPv6 connectivity. Custom fallback URLs can be supplied when the default probes are unavailable or blocked. In Node.js, the package combines HTTPS, DNS, captive-portal, and Cloudflare checks in parallel for greater reliability. This makes it useful for apps that need a practical connectivity test before starting network-dependent work.