is-valid-http

    2.0.1 • Public • Published

    is-valid-http

    Last version

    Check if a string is a HTTP/HTTPS

    Install

    $ npm install is-valid-http

    Usage

    const isUrlCheck = require('is-valid-http');
     
    isUrlCheck('https://example.com'); //=> true
    isUrlCheck('http://example.com'); //=> true
    isUrlCheck('https://localhost'); //=> true
    isUrlCheck('http://localhost'); //=> true
    isUrlCheck('example.com'); //=> false
    isUrlCheck('https://example'); //=> false
    isUrlCheck('ftp://example'); //=> false
    isUrlCheck('gopher://example'); //=> false
    isUrlCheck('notvalidurl'); // => false

    Install

    npm i is-valid-http

    DownloadsWeekly Downloads

    31

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    4.05 kB

    Total Files

    4

    Last publish

    Collaborators

    • securityresearch_bugz