rittenhop-dev/versions/5.94.2/node_modules/@tryghost/url-utils/lib/utils/is-ssl.js

10 lines
247 B
JavaScript
Raw Normal View History

2024-09-23 19:40:12 -04:00
// require the whatwg compatible URL library (same behaviour in node and browser)
const {URL} = require('url');
function isSSL(urlToParse) {
const {protocol} = new URL(urlToParse);
return protocol === 'https:';
}
module.exports = isSSL;