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

cdocparser

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdocparser - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

2

index.js

@@ -48,3 +48,3 @@ 'use strict';

var CommentParser = (function(){
var annotationRegex = /^\s*@(\w+)/;
var annotationRegex = /^@(\w+)/;

@@ -51,0 +51,0 @@ function CommentParser (annotations) {

{
"name": "cdocparser",
"version": "0.0.12",
"version": "0.0.13",
"description": "Extract C style comments and extract context from source",

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

@@ -64,2 +64,3 @@ var assert = require("assert");

{ lines : ['test', 'test', '@test'], context : { type : 'testType1'} },
{ lines : ['test', 'test', ' @test'], context : { type : 'testType1'} },
{ lines : ['test', 'test', '@aliasTest'], context : { type : 'testType2'} },

@@ -97,3 +98,3 @@ { lines : ['test', 'test', '@test'], context : { type : 'testType2'} },

var result = parser.parse ( comments );
assert.equal(result.testType1.length , 1);
assert.equal(result.testType1.length , 2);
assert.equal(result.testType2.length , 2);

@@ -105,3 +106,3 @@ assert.equal(result.testType3.length , 3);

var result = parser.parse ( comments );
assert.equal(result.testType1.length , 1);
assert.equal(result.testType1.length , 2);
assert.equal(result.testType1[0].description , 'test\ntest\n');

@@ -127,4 +128,9 @@ });

it('should ignore annotations that aren\'t at the start of the line', function(){
var result = parser.parse ( comments );
assert.equal(result.testType1[1].test , undefined);
});
});
});
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