Socket
Socket
Sign inDemoInstall

api-doc-validator

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-doc-validator - npm Package Compare versions

Comparing version 2.25.0 to 2.26.0

26

lib/parseAnnotations.js

@@ -11,6 +11,7 @@ const annotations = require('./annotations');

var list = [];
var last;
const list = [];
let last;
let index = 0;
comment.split("\n").forEach(function (line, index) {
comment.split("\n").forEach(function (line, i) {
const match = annotationRule.exec(line);

@@ -23,8 +24,10 @@

start: {
line: index,
line: i,
column: match[1].length,
index: index + match.index + match[1].length,
},
end: {
line: index,
line: i,
column: line.length,
index: index + match[0].length
},

@@ -39,4 +42,7 @@ };

last.end.column = line.length;
last.end.index += line.length + 1;
}
else if (line.trim()) {
const offset = line.match(/^\s*/)[0].length;
last = {

@@ -46,8 +52,10 @@ name: 'description',

start: {
line: index,
column: line.match(/^\s*/)[0].length,
line: i,
column: offset,
index: index + offset,
},
end: {
line: index,
line: i,
column: line.length,
index: index + line.length + 1,
},

@@ -58,2 +66,4 @@ };

}
index += line.length + 1;
});

@@ -60,0 +70,0 @@

@@ -50,2 +50,3 @@ const fs = require('fs');

let column = 0;
let index = 0;
let array_text = '';

@@ -57,2 +58,4 @@ let array_start_count = 0;

const updatePos = function (text) {
index += text.length;
const l = countLines(text);

@@ -177,2 +180,3 @@

column: column - 3,
index: index - 3,
};

@@ -245,2 +249,3 @@

column,
index,
}

@@ -247,0 +252,0 @@ };

{
"name": "api-doc-validator",
"version": "2.25.0",
"version": "2.26.0",
"description": "api doc and validator",

@@ -5,0 +5,0 @@ "main": "index.js",

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