function isProtocolSecure (protocolSupplier) {
  const protocol =
    typeof protocolSupplier === 'function' ? protocolSupplier() : ''
  return protocol && protocol.toLowerCase().indexOf('https') >= 0
}
@param {function(): string} protocolSupplier - function that detects protocol of the web page.
@return {boolean} `true` if protocol returned by the given function is secure, `false` otherwise.