Package Exports
- localhost-url-regex
- localhost-url-regex/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (localhost-url-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.
If you need a more sophisticated solution, check is-localhost-ip.
Install
$ npm install localhost-url-regex --saveUsage
const localhostUrl = require('localhost-url-regex')
localhostUrl().test('http://localhost:3000') // true
localhostUrl().test('http://example.com') // falseLicense
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 · X @Kikobeats