islive
v1.3.0
Published
Check if connected to internet using fetch.
Downloads
11
Maintainers
Readme
const isLive = require("islive");
// Inside an async function:
await isLive(); // true if internet access, false if none
// or
isLive().then((connected) => {
if (connected) {
// internet access
} else {
// no internet
}
});