WouterBos/Codeview — Issue #1: Namespaces show constructors
Author: VesQ
Created: 2011-12-18 21:05:10+00:00
State: open

Namespaces show constructors even though they shouldn't, according to http://code.google.com/p/jsdoc-toolkit/wiki/TagNamespace

A file that shows the error:

/**
* @namespace Holds static functions for HTTP abstraction that works like cbNetwork equivalent.
*/
var HTTP = {};

/**
* Creates a HTTP GET request and calls the callback with the results.
*
* @requires http, url
*
* @param {String} url Address to GET
* @param {Function} cb function (statusCode, data) { } statusCode will be 0 on failure
*/
HTTP.get = function (url, cb) {
var urlObj = urlParser.parse(url);
http.get({
host: urlObj.hostname,
port: 80,
path: urlObj.path,
agent: false
// Let's wait for the server's response
}, function (res) {
var data = '';
// Some data received
res.on('data', function (chunk) {
data += chunk;
});
// All done
res.on('end', function () {
cb(res.statusCode, data);
});
// Something went wrong before we got our response
}).on('error', function (e) {
cb(0, e.message);
});
};