npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

doc-maker

v0.0.7

Published

make comments for usage in apidoc

Readme

doc-maker

It helps to make documentation using apidoc npm extension. what it basically does is that it makes basic skeleton to be used before you actually complete the documentation. To see apidoc documentation visit here

Currently it saves the documentation in /tmp/comment.js file.

Installation

To install type - npm install doc-maker

Usage

Basic usage: To test the basic usage

var DocMaker = require('doc-maker');
(function(){
    if(require.main==module){
	var input = {
	    uri: 'localhost:2191/some/api/check', //uri to your api which will be called,
	    method: 'POST', //type of http api call GET/POST supported
	    success: [{a:1,b:2},{a:3,b:4}], //input to the uri which will give successful result 
	    failure: [{a:1},{b:2},{}], //input to the uri which will give unsuccessful result
	    outputFilePath:'/tmp/comment.js' //location where the output data will be finally written
	};
	//now just call the make_comments function with your input
	DocMaker.make_comments(input,function (err){
	    if(err){
		    console.log(err);	
	    }
	    console.log('all  done');
	});
    }
})();

Input: detailed information of the input

accepted by make_comments function

uri

Uri which is to be hit to get the response. Eg. localhost:2191/some/api/check

method

HTTP method which has to be made like GET/POST (these 2 supported till now)

success[]

Array of multiple input to the uri which will give successful results. Each element of the array must be valid input to the uri. Eg if some API

POST localhost:2191/some/api/check 

accepts input of the form {a:1,b:2} then the success array will have something like [{a:1,b:2},{a:3,b:4}]

failure[]

Array of multiple input which will give error response for the api request. The result of the api must be provided in the body. for eg.

POST localhost:2191/some/api/check

with data {a:1} gives HTTP error status 409 and also gives response {missing:['b']} in the response body

So multiple failure case input must be given like [{a:1},{a:2},{a:3}]

outputFilePath

Location where the final comment file will be finally written. Eg. /tmp/comment.js in our above example.

Format of the Output

Finally when the program is run then /tmp/comment.js file will look like shown below. You can now skip the tedious task of writing the data , rather you can just concentrate on writing the information. like param description etc.

 @api {post} localhost:2191/some/api/check
 @apiVersion 0.0.1
 @apiName 
 @apiGroup 
 @apiDescription 
 @apiParam {object} input 
 @apiParam {number} input.a 
 @apiParam {number} input.b 
 @apiParamExample {JSON} Request-Example:
{
    "a": 1,
    "b": 2
}
 @apiParamExample {JSON} Request-Example:
{
    "a": 3,
    "b": 4
}
 @apiSuccess {object} success 
 @apiSuccessExample {JSON} Success-Response

 @apiSuccessExample {JSON} Success-Response

 @apiError {object} failure 
 @apiErrorExample {JSON} Error-Response

 @apiErrorExample {JSON} Error-Response

 @apiErrorExample {JSON} Error-Response
/tmp/comment.js (END)