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

comment-parser

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comment-parser - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

5

CHANGELOG.md
# v0.1.2
- `bugfix` Allow to build nested tags from `name.subname` even if `name` wasn't d
- `bugfix` Preserve indentation when extracting comments
# v0.1.1

@@ -3,0 +8,0 @@

12

index.js

@@ -10,3 +10,3 @@

var RE_COMMENT_START = /^\s*\/\*\*\s*$/m;
var RE_COMMENT_LINE = /^\s*\*(?:\s+|$)/m;
var RE_COMMENT_LINE = /^\s*\*(?:\s|$)/m;
var RE_COMMENT_END = /^\s*\*\/\s*$/m;

@@ -65,3 +65,11 @@

if (!parent_tag) { return tags; }
if (!parent_tag) {
parent_tag = {
tag : tag.tag,
name : parent_name,
type : '',
description : ''
}
parent_tags.push(parent_tag);
}

@@ -68,0 +76,0 @@ parent_tag.tags = parent_tag.tags || [];

2

package.json
{
"name": "comment-parser",
"version": "0.1.1",
"version": "0.1.2",
"description": "Generic JSDoc-like comment parser. ",

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

@@ -196,14 +196,2 @@ var fs = require('fs');

it('should skip invalid tags', function() {
expect(parsed(function(){
/**
* @my-tag {my.type
*/
})[0])
.to.eql({
description : '',
tags : []
});
});
it('should parse multiple tags', function() {

@@ -210,0 +198,0 @@ expect(parsed(function(){

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