Comparing version 1.0.1 to 1.0.2
20
doxli.js
@@ -51,12 +51,16 @@ var util = require('util'); | ||
module.exports = function (file) { | ||
console.log("doxlify " + __dirname + file); | ||
var path = require.resolve(file); | ||
console.log("doxlifying " + path); | ||
var obj = require(path); | ||
djs = dox.parseComments(fs.readFileSync(file).toString()); | ||
for (var x in obj) { | ||
obj[x].help = getdox(x); | ||
module.exports = function (mod) { | ||
var i; | ||
var path; | ||
for (i in require.cache) { | ||
if (mod === require.cache[i].exports) { | ||
console.log(require.cache[i]); | ||
path = require.cache[i].filename; | ||
} | ||
} | ||
djs = dox.parseComments(fs.readFileSync(path).toString()); | ||
for (i in mod) { | ||
mod[i].help = getdox(i); | ||
} | ||
} | ||
{ | ||
"name": "doxli", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Get dox documentation for modules on the command line.", | ||
@@ -5,0 +5,0 @@ "main": "doxli.js", |
@@ -18,3 +18,3 @@ doxli | ||
> var doxli = require('doxli'); | ||
> doxli('./foo.js'); | ||
> doxli(foo); | ||
``` | ||
@@ -27,10 +27,1 @@ Module ```foo```'s exported methods now have a ```help``` utility! | ||
``` | ||
Using doxli in a module to provide ```help``` functions on exported functions. | ||
``` | ||
var doxli = require('doxli'); | ||
// module definition goes here | ||
// ... | ||
doxli(__filename); | ||
``` |
@@ -39,2 +39,2 @@ var doxli = require('../doxli'); | ||
doxli(__filename); | ||
doxli(this); |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
132
1
4472
26