Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-absolute-http-uri/docs/types/index.d"

Index

Functions

Functions

Export assignment isAbsoluteHttpURI

  • isAbsoluteHttpURI(value: any): boolean
  • Tests whether a value is an absolute HTTP(S) URI.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating whether a value is an absolute HTTP(S) URI

    Example

    var bool = isAbsoluteHttpURI( 'http://example.com/' );
    // returns true

    Example

    var bool = isAbsoluteHttpURI( 'https://example.com/docs#heading' );
    // returns true

    Example

    var bool = isAbsoluteHttpURI( 'ftp://example.com' );
    // returns false

    Example

    var bool = isAbsoluteHttpURI( '/dashboard' );
    // returns false

    Example

    var bool = isAbsoluteHttpURI( './png.json' );
    // returns false

    Example

    var bool = isAbsoluteHttpURI( null );
    // returns false