Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "string/validate-url"

Index

Variables

Functions

Variables

Const validURL

validURL: RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/

Utility functions for string.

Functions

validateURL

  • validateURL(str: string): boolean
  • Validates that a string is a valid url.

    Parameters

    • str: string

      The string to try to validate.

    Returns boolean

    True if looks like a valid url, false otherwise.

Generated using TypeDoc