UNPKG

@slide-computer/signer-web

Version:

JavaScript and TypeScript library to communicate with web signers on the Internet Computer

16 lines 492 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.urlIsSecureContext = void 0; const urlIsSecureContext = (value) => { try { const url = new URL(value); return (url.protocol === "https:" || url.hostname === "127.0.0.1" || url.hostname.split(".").slice(-1)[0] === "localhost"); } catch (_a) { return false; } }; exports.urlIsSecureContext = urlIsSecureContext; //# sourceMappingURL=utils.js.map