Comparing version 1.0.3 to 1.0.4
19
doxli.js
@@ -8,5 +8,10 @@ var util = require('util'); | ||
return function () { | ||
var comment = djs.filter(function (i) { | ||
return (i.ctx && i.ctx.name === name); | ||
})[0]; | ||
var comment = null; | ||
if (name) { | ||
comment = djs.filter(function (i) { | ||
return (i.ctx && i.ctx.name === name); | ||
})[0]; | ||
} else { | ||
comment = djs[0]; | ||
} | ||
if (!comment) { | ||
@@ -61,6 +66,10 @@ return console.log("Sorry, no dox comments for " + name); | ||
djs = dox.parseComments(fs.readFileSync(path).toString()); | ||
for (i in mod) { | ||
mod[i].help = getdox(i); | ||
if (typeof mod === 'object') { | ||
for (i in mod) { | ||
mod[i].help = getdox(i); | ||
} | ||
} else if (typeof mod === 'function') { | ||
mod.help = getdox(); | ||
} | ||
} | ||
{ | ||
"name": "doxli", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Get dox documentation for modules on the command line.", | ||
@@ -5,0 +5,0 @@ "main": "doxli.js", |
#!/usr/bin/env node | ||
var u = require('./util2.js'); | ||
u.escape.help(); | ||
u.countfoo.help(); | ||
var u2= require('./util2.js'); | ||
u2.escape.help(); | ||
u2.countfoo.help(); | ||
var u3 = require('./util3.js'); | ||
var doxli = require('../doxli'); | ||
doxli(u3); | ||
u3.help(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5274
8
161