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

linkinator

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkinator - npm Package Compare versions

Comparing version 1.1.7 to 1.2.0

12

build/src/links.js

@@ -20,2 +20,3 @@ "use strict";

],
srcset: ['img', 'source'],
};

@@ -28,3 +29,4 @@ function getLinks(source, baseUrl) {

$(elements).each((i, element) => {
links.push(element.attribs[attr]);
const values = parseAttr(attr, element.attribs[attr]);
links.push(...values);
});

@@ -36,2 +38,10 @@ });

exports.getLinks = getLinks;
function parseAttr(name, value) {
switch (name) {
case 'srcset':
return value.split(',').map((pair) => pair.trim().split(/\s+/)[0]);
default:
return [value];
}
}
function normalizeLink(link, baseUrl) {

@@ -38,0 +48,0 @@ try {

2

package.json
{
"name": "linkinator",
"description": "Find broken links, missing images, etc in your HTML. Scurry around your site and find all those broken links.",
"version": "1.1.7",
"version": "1.2.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": "JustinBeckwith/linkinator",

Sorry, the diff of this file is not supported yet

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