New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svglint

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svglint - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

test/svgs/empty-line.svg

2

package.json
{
"name": "svglint",
"version": "1.0.4",
"version": "1.0.5",
"description": "Linter for SVGs",

@@ -5,0 +5,0 @@ "main": "src/svglint.js",

@@ -93,3 +93,3 @@ /**

// @ts-ignore
return Parser.parseDOM(source, {
const outp = Parser.parseDOM(source, {
withStartIndices: true,

@@ -99,2 +99,3 @@ withEndIndices: true,

});
return outp;
}

@@ -121,3 +122,3 @@

let columnNum = lineStart;
while ((columnNum = source.lastIndexOf("\n", columnNum - 1)) !== -1) {
while ((columnNum = source.lastIndexOf("\n", columnNum - 1)) !== -1 && columnNum > 0) {
++numLines;

@@ -124,0 +125,0 @@ }

@@ -28,2 +28,10 @@ const expect = require("expect");

it("should succeed with empty first line", function(done) {
const result = SVGLint.lintSource("\n" + svg, {});
result.on("done", () => {
expect(result.state).toBe(result.STATES.success);
done();
});
});
it("should throw with malformed SVG", function() {

@@ -30,0 +38,0 @@ expect(() => {

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