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 🙏

© 2025 – Pkg Stats / Ryan Hefner

code2doc

v0.1.4

Published

An useful tool for transfer code to document.

Readme

code2doc

An useful tool for transfer code to document.

Download

The source is available for download from GitHub. Alternatively, you can install using Node Package Manager (npm):

npm install code2doc -g

Quick Examples

code2doc -c code -d doc -p node.js -t default -h http://interface.example.com:8080
code2doc -c code -d doc -p php -t default -h http://interface.example.com:8080
code2doc -c code -d doc -p ./my_parsers/java -t ./my_templates/my_ui -h http://interface.example.com:8080

Params

code

The code folder that you want to transfer.

document

The document folder that save the result.

parser

The parser that you choose to analyse the codes. The default parser is node.js. The other choose is php. In addition, you can define the parser by yourself. If you want to use your parser, you can do it like this:

-p ./my_parsers/java.js

template

The template file that you choose to render the result. The default template file is bootstrap style. In addition, you can define the template file bye yourself. If you want to use your template file, you can do it like this:

-t ./my_templates/my_template

Notice: code2doc just support swig engine now, so you should define the extension name as .swig.

host

Sometimes, your code will run at different hosts. for the less modify, you can use the host param to define the host. It work like this:

/**
 * interface1
 *
 * some description
 * some description 
 * ...
 * 
 * @interface {!host}module2/interface1
 * @method post
 * @param {get|int} get_param1 get param1
 * @param {get|text} get_param2 get param1
 * @param {post|text} post_param1 post param1
 * @param {post|int} post_param2 post param1
 * @param {post|file} file_param1 file param1
 * @return {json|string}
 */

If you set the host param as https://app.my-web.com:8090/, the interface will be https://app.my-web.com:8090/module2/interface1