gitly
Version:
An API to download and/or extract git repositories
15 lines (14 loc) • 373 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isOffline = isOffline;
const node_dns_1 = require("node:dns");
const { lookup } = node_dns_1.promises;
async function isOffline() {
try {
await lookup('google.com');
return false;
// eslint-disable-next-line no-empty
}
catch (_) { }
return true;
}