urlregex

0.6.8 • Public • Published

urlregex

Greenkeeper badge

No-dependency URL validation for Node and the browser.

Install

npm install urlregex

Usage

const urlRegex = require('urlregex');
const isValid = urlRegex().test('http://github.com');

allowedProtocols option

You can provide the allowedProtocols option to specify which protocols are allowed in the URL. It can either be an array of strings or the '*' wildcard to allow any protocol.

Credits

Mostly based on url-regex package, but optimized for browser usage

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i urlregex

Weekly Downloads

2,218

Version

0.6.8

License

MIT

Unpacked Size

16.1 kB

Total Files

11

Last publish

Collaborators

  • nescalante
  • hiuxmaycry