localhost-url-regex

1.0.11 • Public • Published

localhost-url-regex

Regex for matching localhost alike URLs.

Note: There are Bogon IP address ranges not covered by this regex.

The intention of this package is to cover some of the most common cases.

Install

$ npm install localhost-url-regex --save

Usage

const localhostUrl = require('localhost-url-regex')

localhostUrl().test('http://localhost:3000') // true
localhostUrl().test('http://example.com') // false

License

localhost-url-regex © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats

Dependencies (0)

    Dev Dependencies (16)

    Package Sidebar

    Install

    npm i localhost-url-regex

    Weekly Downloads

    835

    Version

    1.0.11

    License

    MIT

    Unpacked Size

    4.75 kB

    Total Files

    4

    Last publish

    Collaborators

    • kikobeats