link-check
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -5,2 +5,3 @@ "use strict"; | ||
var Isemail = require('isemail'); | ||
var isRelativeUrl = require('is-relative-url'); | ||
var request = require('request'); | ||
@@ -21,7 +22,2 @@ | ||
var absoluteLinkMatcher = new RegExp('^(?:[a-z]+:)?//', 'i'); | ||
function isRelativeLink(link) { | ||
return !absoluteLinkMatcher.test(link); | ||
} | ||
module.exports = function linkCheck(link, opts, callback) { | ||
@@ -50,3 +46,3 @@ | ||
if (opts.baseUrl && isRelativeLink(link)) { | ||
if (opts.baseUrl && isRelativeUrl(link)) { | ||
options.baseUrl = opts.baseUrl; | ||
@@ -53,0 +49,0 @@ } |
{ | ||
"name": "link-check", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "checks whether a hyperlink is alive (200 OK) or dead", | ||
@@ -31,4 +31,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"is-relative-url": "^2.0.0", | ||
"isemail": "^2.2.1", | ||
"request": "^2.75.0" | ||
"request": "^2.79.0" | ||
}, | ||
@@ -38,4 +39,4 @@ "devDependencies": { | ||
"express": "^4.14.0", | ||
"jshint": "^2.9.3", | ||
"mocha": "^3.1.0" | ||
"jshint": "^2.9.4", | ||
"mocha": "^3.1.2" | ||
}, | ||
@@ -42,0 +43,0 @@ "jshintConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11970
10
3
195
+ Addedis-relative-url@^2.0.0
+ Addedis-absolute-url@2.1.0(transitive)
+ Addedis-relative-url@2.0.0(transitive)
Updatedrequest@^2.79.0