Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

url-regex

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-regex - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

14

index.js
'use strict';
var ip = require('ip-regex').v4().source;
var tlds = require('./tlds.json').join('|');

@@ -8,2 +9,3 @@

*
* @param {Object} opts
* @api public

@@ -22,15 +24,5 @@ */

var tld = '(?:\\.(?:xn--[a-z0-9\\-]{1,59}|' + tlds + '+))';
var ips = [
'(?!10(?:\\.\\d{1,3}){3})',
'(?!127(?:\\.\\d{1,3}){3})',
'(?!169\\.254(?:\\.\\d{1,3}){2})',
'(?!192\\.168(?:\\.\\d{1,3}){2})',
'(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})',
'(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])',
'(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}',
'(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))'
].join('');
var regex = [
protocol + auth + '(?:' + ips + '|',
protocol + auth + '(?:' + ip + '|',
'(?:localhost)|' + host + domain + tld + ')' + port + path

@@ -37,0 +29,0 @@ ].join('');

{
"name": "url-regex",
"version": "2.1.1",
"version": "2.1.2",
"description": "Regular expression for matching URLs",

@@ -32,3 +32,6 @@ "license": "MIT",

"tlds": "^1.14.0"
},
"dependencies": {
"ip-regex": "^1.0.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc