Socket
Socket
Sign inDemoInstall

dox

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dox - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

.settings/launch.json

8

History.md

@@ -0,1 +1,9 @@

0.8.0 / 2015-05-27
==================
* Fix: Tags with whitespace between the tag start and the previous line ending are now parsed correctly.
* Deps: commander@2.8.1
* Deps: jsdoctypeparser@1.2.0
- Better compatibility for type declarations, but may result in changes to output with invalid types.
0.7.1 / 2015-04-03

@@ -2,0 +10,0 @@ ==================

31

lib/dox.js

@@ -205,3 +205,3 @@ /*!

, description = {}
, tags = str.split('\n@');
, tags = str.split(/\n\s*@/);

@@ -311,3 +311,4 @@ // A comment has no description

, type = tag.type = parts.shift().replace('@', '')
, matchType = new RegExp('^@?' + type + ' *');
, matchType = new RegExp('^@?' + type + ' *')
, matchTypeStr = /^\{.+\}$/;

@@ -324,3 +325,3 @@ tag.string = str.replace(matchType, '');

case 'param':
var typeString = parts.shift();
var typeString = matchTypeStr.test(parts[0]) ? parts.shift() : "";
tag.name = parts.shift() || '';

@@ -333,3 +334,4 @@ tag.description = parts.join(' ');

case 'returns':
exports.parseTagTypes(parts.shift(), tag);
var typeString = matchTypeStr.test(parts[0]) ? parts.shift() : "";
exports.parseTagTypes(typeString, tag);
tag.description = parts.join(' ');

@@ -374,3 +376,4 @@ break;

case 'throws':
tag.types = exports.parseTagTypes(parts.shift());
var typeString = matchTypeStr.test(parts[0]) ? parts.shift() : "";
tag.types = exports.parseTagTypes(typeString);
tag.description = parts.join(' ');

@@ -384,3 +387,3 @@ break;

default:
tag.string = parts.join(' ');
tag.string = parts.join(' ').replace(/\s+$/, '');
break;

@@ -414,2 +417,10 @@ }

exports.parseTagTypes = function(str, tag) {
if (!str) {
if(tag) {
tag.types = [];
tag.typesDescription = "";
tag.optional = tag.nullable = tag.nonNullable = tag.variable = false;
}
return [];
}
var Parser = require('jsdoctypeparser').Parser;

@@ -503,3 +514,3 @@ var Builder = require('jsdoctypeparser').Builder;

// class, possibly exported by name or as a default
if (/^\s*(export(\s+default)?\s+)?class\s+([\w$]+)(\s+extends\s+([\w$.]+))?\s*{/.exec(str)) {
if (/^\s*(export(\s+default)?\s+)?class\s+([\w$]+)(\s+extends\s+([\w$.]+(?:\(.*\))?))?\s*{/.exec(str)) {
return {

@@ -531,3 +542,3 @@ type: 'class'

function (str, parentContext) {
if (/^\s*([\w$]+)\s*\(/.exec(str)) {
if (/^\s*(static)?\s*(\*)?\s*([\w$]+|\[.*\])\s*\(/.exec(str)) {
return {

@@ -537,4 +548,4 @@ type: 'method'

, cons: parentContext.name
, name: RegExp.$1
, string: (parentContext && parentContext.name && parentContext.name + '.prototype.' || '') + RegExp.$1 + '()'
, name: RegExp.$2 + RegExp.$3
, string: (parentContext && parentContext.name && parentContext.name + (RegExp.$1 ? '.' : '.prototype.') || '') + RegExp.$2 + RegExp.$3 + '()'
};

@@ -541,0 +552,0 @@ // named function statement, possibly exported by name or as a default

{
"name": "dox",
"description": "Markdown / JSdoc documentation generator",
"version": "0.7.1",
"version": "0.8.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -31,9 +31,9 @@ "contributors": [

"dependencies": {
"commander": "~2.7.1",
"jsdoctypeparser": "^1.1.4",
"commander": "~2.8.1",
"jsdoctypeparser": "^1.2.0",
"marked": ">=0.3.1"
},
"devDependencies": {
"mocha": "~2.2.1",
"should": "~5.2.0"
"mocha": "~2.2.5",
"should": "~6.0.3"
},

@@ -40,0 +40,0 @@ "scripts": {

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