Skip to content
Snippets Groups Projects
Commit 2594c0c3 authored by rswindell's avatar rswindell
Browse files

Script to generate object model documentation (eventually in HTML).

Currently, it just enumerates the properties of the built-in objects.
parent d31474c4
No related branches found
No related tags found
No related merge requests found
// jsdocs.js
// This script will (eventually be used to) generated HTML documentation of the
// Synchronet JavaScript object model
function document_object(name,obj)
{
var prop_name;
for(prop in obj) {
prop_name=name + "." + prop;
printf("%-8s %s\r\n",typeof(obj[prop]),prop_name);
if(typeof(obj[prop])=="object") {
if(obj[prop].length != undefined) // array ?
document_object(prop_name + "[]",obj[prop][0]);
else
document_object(prop_name,obj[prop]);
}
}
}
document_object("client" ,client);
document_object("system" ,system);
document_object("bbs" ,bbs);
document_object("user" ,user);
document_object("server" ,server);
document_object("console" ,console);
document_object("msg_area" ,msg_area);
document_object("file_area" ,file_area);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment