{"_id":"reference","_rev":"13-7fa81407ef20c83746ffade2cfcef08e","name":"reference","description":"Generate documentation from JSON.","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.0":{"name":"reference","version":"0.0.0","description":"Generate documentation from JSON.","main":"reference.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":"","author":{"name":"Michelle Bu"},"license":"BSD","readme":"# reference.js\n\nGenerate a simple API reference from JSON. Made specifically for\n<a href=\"http://peerjs.com\">PeerJS</a>, so it probably won't suit your needs.\n\n## Expected style\n\nThe `name` property is **required**. Everything else is optional. Anchor IDs\nwill correspond to the nesting of the current property (e.g.\n`Some Class -> klass#method -> argument` has an ID of\n`some_class-klassmethod-argument`).\n\n```javascript\n[\n  {\n    \"name\": \"TopLevelClass\",\n    \"type\": \"constructor\",\n    \"description\": \"This class does some stuff.\",\n    \"snippet\": \"var klass = new TopLevelClass(arg1, [callback]);\",\n    \"children\": [\n      {\n        \"name\": \"arg1\",\n        \"type\": \"string\",\n        \"description\": \"This is an argument for the constructor.\"\n      },\n      {\n        \"name\": \"callback\",\n        \"type\": \"function\",\n        \"description\": \"This is an optional callback.\",\n        \"optional\": true,\n        \"children\": {\n          \"name\": \"err\",\n          \"type\": \"error\",\n          \"description\": \"Will callback with an error if you messed up.\"\n        }\n      }\n    ]\n  },\n  {\n    \"name\": \"AnotherTopLevelClass\",\n    \"type\": \"constructor\",\n    \"description\": \"This class does some other stuff.\",\n    \"snippet\": \"var klass2 = new AnotherTopLevelClass(options);\",\n    \"children\": {\n      \"name\": \"options\",\n      \"type\": \"object\",\n      \"description\": \"This is a hash of options for AnotherTopLevelClass.\",\n      \"children\": [\n        {\n          \"name\": \"option1\",\n          \"description\": \"This is anything, really.\"\n        },\n        {\n          \"name\": \"option2\",\n          \"description\": \"This is just really another option.\"\n        }\n      ]\n    }\n  }\n]\n```\n\nThe above should give you something like this:\n\n<img src=\"http://cl.ly/image/021u0r0j2c2x/Screen%20Shot%202013-09-15%20at%202.30.30%20AM.png\" width=\"300px\">\n\n## Generate PeerJS demo\n\n```\ncd demo\nnpm install\nnode demo.js\n```\n","readmeFilename":"README.md","_id":"reference@0.0.0","dist":{"shasum":"520d1cfc938499e058f6a50a7f1ae037155daa38","tarball":"https://registry.npmjs.org/reference/-/reference-0.0.0.tgz","integrity":"sha512-fQLVWHoDG7g57TP/PCuAOTV1a4/C3XfIpcaMc3/QoKXRx6gonAPueR1crYTYoOXvbl3QOx3x8ClnHLHWe9F77Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBiATDwe0tZLdhZkH5A4UzJw07PCaaoQfb6Hv28JosWhAiALa5Whd1+tYSg3pv/4kLqu+7HDF9hSFG+Lxp2oo/aU6Q=="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"michelle","email":"michellebu@berkeley.edu"},"maintainers":[{"name":"michelle","email":"michellebu@berkeley.edu"}],"directories":{}},"0.1.0":{"name":"reference","version":"0.1.0","description":"Generate documentation from JSON.","main":"reference.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":"","author":{"name":"Michelle Bu"},"license":"BSD","readme":"# reference.js\n\nGenerate a simple API reference from JSON. Made specifically for\n<a href=\"http://peerjs.com/docs\">PeerJS</a>, so it probably won't suit your needs.\n\n## Expected style\n\nThe `name` property is **required**. Everything else is optional. Anchor IDs\nwill correspond to the nesting of the current property (e.g.\n`Some Class -> klass#method -> argument` has an ID of\n`some_class-klassmethod-argument`).\n\n```javascript\n[\n  {\n    \"name\": \"TopLevelClass\",\n    \"type\": \"constructor\",\n    \"tags\": [\"my\", \"tags\"], // newly-added; doesn't show up in the pic below.\n    \"description\": \"This class does some stuff.\",\n    \"snippet\": \"var klass = new TopLevelClass(arg1, [callback]);\",\n    \"children\": [\n      {\n        \"name\": \"arg1\",\n        \"type\": \"string\",\n        \"description\": \"This is an argument for the constructor.\"\n      },\n      {\n        \"name\": \"callback\",\n        \"type\": \"function\",\n        \"description\": \"This is an optional callback.\",\n        \"optional\": true,\n        \"children\": {\n          \"name\": \"err\",\n          \"type\": \"error\",\n          \"description\": \"Will callback with an error if you messed up.\"\n        }\n      }\n    ]\n  },\n  {\n    \"name\": \"AnotherTopLevelClass\",\n    \"type\": \"constructor\",\n    \"description\": \"This class does some other stuff.\",\n    \"snippet\": \"var klass2 = new AnotherTopLevelClass(options);\",\n    \"children\": {\n      \"name\": \"options\",\n      \"type\": \"object\",\n      \"description\": \"This is a hash of options for AnotherTopLevelClass.\",\n      \"children\": [\n        {\n          \"name\": \"option1\",\n          \"description\": \"This is anything, really.\"\n        },\n        {\n          \"name\": \"option2\",\n          \"description\": \"This is just really another option.\"\n        }\n      ]\n    }\n  }\n]\n```\n\nThe above should give you something like this:\n\n<img src=\"http://cl.ly/image/021u0r0j2c2x/Screen%20Shot%202013-09-15%20at%202.30.30%20AM.png\" width=\"300px\">\n\n## Generate PeerJS demo\n\n```\ncd demo\nnpm install\nnode demo.js\n```\n","readmeFilename":"README.md","_id":"reference@0.1.0","dist":{"shasum":"c7ca67f8c180f53c14eccb250226ed6b8f08b5d3","tarball":"https://registry.npmjs.org/reference/-/reference-0.1.0.tgz","integrity":"sha512-7sj5Mc8Bwe8l8E3yVn/7W8pd36ZqQ536tpo1kDQFyb+HMbgdfMklORm3TjOd4RcgQfoEIeVM8HK1cRYbzxsc4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL9d+CbXwvRcHLs3gUPqGQgk4DvA5juxroPUZNdRw2TgIhAIh3uzKiO4MsbR91f1kiQGHwX6PvPepaB189grL5hvRE"}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"michelle","email":"michellebu@berkeley.edu"},"maintainers":[{"name":"michelle","email":"michellebu@berkeley.edu"}],"directories":{}},"0.1.1":{"name":"reference","version":"0.1.1","description":"Generate documentation from JSON.","main":"reference.js","repository":{"type":"git","url":"git://github.com/michellebu/reference.git"},"author":{"name":"Michelle Bu"},"license":"BSD","dependencies":{"yaml":"~0.2.3"},"readme":"# reference.js\n\nGenerate a simple API reference from JSON. Made specifically for\n<a href=\"http://peerjs.com/docs\">PeerJS</a>, so it probably won't suit your needs.\n\n    npm install reference\n\n## Usage\n\n```javascript\nvar reference = require('reference');\nvar fs = require('fs');\n\nvar file = fs.readFileSync('./documentation.json', {anchor: true}); // adds permalinks/anchors for all headings.\n// also accepts yaml.\n\n// Generated HTML!\nvar html = reference(file);\n```\n\n## Expected style\n\nThe `name` property is **required**. Everything else is optional. Anchor IDs\nwill correspond to the nesting of the current property (e.g.\n`Some Class -> klass#method -> argument` has an ID of\n`some_class-klassmethod-argument`).\n\n```javascript\n[\n  {\n    \"name\": \"TopLevelClass\",\n    \"type\": \"constructor\",\n    \"tags\": [\"my\", \"tags\"], // newly-added; doesn't show up in the pic below.\n    \"description\": \"This class does some stuff.\",\n    \"snippet\": \"var klass = new TopLevelClass(arg1, [callback]);\",\n    \"children\": [\n      {\n        \"name\": \"arg1\",\n        \"type\": \"string\",\n        \"description\": \"This is an argument for the constructor.\"\n      },\n      {\n        \"name\": \"callback\",\n        \"type\": \"function\",\n        \"description\": \"This is an optional callback.\",\n        \"optional\": true,\n        \"children\": {\n          \"name\": \"err\",\n          \"type\": \"error\",\n          \"description\": \"Will callback with an error if you messed up.\"\n        }\n      }\n    ]\n  },\n  {\n    \"name\": \"AnotherTopLevelClass\",\n    \"type\": \"constructor\",\n    \"description\": \"This class does some other stuff.\",\n    \"snippet\": \"var klass2 = new AnotherTopLevelClass(options);\",\n    \"children\": {\n      \"name\": \"options\",\n      \"type\": \"object\",\n      \"description\": \"This is a hash of options for AnotherTopLevelClass.\",\n      \"children\": [\n        {\n          \"name\": \"option1\",\n          \"description\": \"This is anything, really.\"\n        },\n        {\n          \"name\": \"option2\",\n          \"description\": \"This is just really another option.\"\n        }\n      ]\n    }\n  }\n]\n```\n\nThe above should give you something like this:\n\n<img src=\"http://cl.ly/image/021u0r0j2c2x/Screen%20Shot%202013-09-15%20at%202.30.30%20AM.png\" width=\"300px\">\n\n## Generate PeerJS demo\n\n```\ncd demo\nnpm install\nnode demo.js\n```\n","readmeFilename":"README.md","_id":"reference@0.1.1","dist":{"shasum":"530c9ad9bb3fc887525c95a5e5aadbe49ecb69ae","tarball":"https://registry.npmjs.org/reference/-/reference-0.1.1.tgz","integrity":"sha512-3P31eaISxnbporNRHhdp5Km4BM4ELOSqov+pSBfV/JVhJSYALWr5nw1ikho7bDbgC09FeRGGb4wyqn2wB/FYcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHzzzrR8LjJ3m1eJkk8qqktm00cPY7qk/3IeAHkN/6DoCIESmbP3k5QZtgQZVC4hC6QhXei3MmuLwPW0bljDPLguv"}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"michelle","email":"michellebu@berkeley.edu"},"maintainers":[{"name":"michelle","email":"michellebu@berkeley.edu"}]}},"readme":"# reference.js\n\nGenerate a simple API reference from JSON. Made specifically for\n<a href=\"http://peerjs.com\">PeerJS</a>, so it probably won't suit your needs.\n\n## Expected style\n\nThe `name` property is **required**. Everything else is optional. Anchor IDs\nwill correspond to the nesting of the current property (e.g.\n`Some Class -> klass#method -> argument` has an ID of\n`some_class-klassmethod-argument`).\n\n```javascript\n[\n  {\n    \"name\": \"TopLevelClass\",\n    \"type\": \"constructor\",\n    \"description\": \"This class does some stuff.\",\n    \"snippet\": \"var klass = new TopLevelClass(arg1, [callback]);\",\n    \"children\": [\n      {\n        \"name\": \"arg1\",\n        \"type\": \"string\",\n        \"description\": \"This is an argument for the constructor.\"\n      },\n      {\n        \"name\": \"callback\",\n        \"type\": \"function\",\n        \"description\": \"This is an optional callback.\",\n        \"optional\": true,\n        \"children\": {\n          \"name\": \"err\",\n          \"type\": \"error\",\n          \"description\": \"Will callback with an error if you messed up.\"\n        }\n      }\n    ]\n  },\n  {\n    \"name\": \"AnotherTopLevelClass\",\n    \"type\": \"constructor\",\n    \"description\": \"This class does some other stuff.\",\n    \"snippet\": \"var klass2 = new AnotherTopLevelClass(options);\",\n    \"children\": {\n      \"name\": \"options\",\n      \"type\": \"object\",\n      \"description\": \"This is a hash of options for AnotherTopLevelClass.\",\n      \"children\": [\n        {\n          \"name\": \"option1\",\n          \"description\": \"This is anything, really.\"\n        },\n        {\n          \"name\": \"option2\",\n          \"description\": \"This is just really another option.\"\n        }\n      ]\n    }\n  }\n]\n```\n\nThe above should give you something like this:\n\n<img src=\"http://cl.ly/image/021u0r0j2c2x/Screen%20Shot%202013-09-15%20at%202.30.30%20AM.png\" width=\"300px\">\n\n## Generate PeerJS demo\n\n```\ncd demo\nnpm install\nnode demo.js\n```\n","maintainers":[{"name":"michelle","email":"michellebu@berkeley.edu"}],"time":{"modified":"2022-06-26T10:36:31.496Z","created":"2013-09-15T09:50:15.420Z","0.0.0":"2013-09-15T09:50:18.482Z","0.1.0":"2013-09-22T07:17:54.277Z","0.1.1":"2013-10-19T08:38:14.770Z"},"author":{"name":"Michelle Bu"},"repository":{"type":"git","url":"git://github.com/michellebu/reference.git"}}