function urlIsLocal (url) {
  assert('protocol' in url) // ensure it's a url object

  const protocol = url.protocol

  // A URL is local if its scheme is a local scheme.
  // A local scheme is "about", "blob", or "data".
  return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'
}
@see https://fetch.spec.whatwg.org/#is-local
@param {URL} url
@returns {boolean}