@pengzhanbo/utils - v3.4.1
    Preparing search index...

    Function isHttp

    • Check if url is http

      检查 url 是否为 http

      Parameters

      • url: string

        The URL to check. 要检查的URL

      Returns boolean

      True if the URL is HTTP, false otherwise. 如果URL是HTTP则返回true,否则返回false

      isHttp('http://example.com') // true
      isHttp('https://example.com') // true
      isHttp('//example.com') // true
      isHttp('ftp://example.com') // false
      isHttp('example.com') // false
      isHttp('mailto:username@example.com') // false