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-parsr

v1.3.1

Published

A documentation parser/generator, similar to JSDoc

Readme

Doc Parsr


doc-parsr is a documentation parser similar to JSDoc. I've built it since I needed a way to parse only comments ( no code ) and the ability to add-remove 'keywords' as I wanted.

For instance, I want to eventually add React and Redux support in my parser.


What does the final product looks like?

Here you can see some screenshots of the included themes:

Simple - The default theme

Simple Theme Preview

Darky - A dark alternative

Darky Theme Preview Darky Theme Preview 2


Installation

  1. Run the command npm install doc-parsr

That's it, you're ready to use doc-parsr!


Configuration

doc-parsr will look for .doc-parsr.json in your project's root folder. If it can't find it, it will use the following default values:

{
    "src": ".",
    "include": [ "\\.jsx?$", "\\.md$" ],
    "exclude": [ "node_modules/", "docs/", ".meteor/" ],
    "output": "./docs",
    "theme": "simple"
}
  • src: The path to the files to parse;
  • include: An array of regex to match filenames ( meant to be used for file extensions );
  • exclude: Array of strings that should not be present in the path of the included files;
  • output: The target folder where to generate the documentation pages;
  • theme: The theme to use. Theme can be one of those in the themes folder of the package, or a path to a custom theme.

Usage

To build your documentation, create a script entry in your package.json or manually run the following command: doc-parsr.

doc-parsr will only read your comments starting with /** ( similar to JSDoc ).

Here is a list of currently supported keywords:

| Keyword | Description | Alias | |---------|--------------|-------| | module | Anything in the same file, following this statement, will be considered as part of a module and will hence not be shown in the Global area, except for classes. | - | | class | Defines a class | - | | @constructor | Used inside a @class, defines the constructor. | @new | | extends | Used with @class, defines which class the current one is extending. | - | | prop | Used inside @class, defines a class property. | @property | | var | Used inside @module or on it's own, defines a variable. | @variable | | method | Used inside @class, defines a class method. | - | | func | Used insde @module or on it's own, defines a function. | @function | | param | Used inside both @constructor, @class and @function, defines a parameter. | @arg, @argument, @parameter | | type | Used inside @prop, and @var, defines the type of the arg/var. | - | | returns | Used inside @method, @function, defines the type of the returned value. | @return | | desc | Add a description for the last keyword. | @description |


Example

/*
    Remember that this parser doesn't care about code, just about comments.
    And more specifically, those starting with double-stars.
    ( which means this comment will be ignored. )
*/

/**
 * Toggles some debug tools.
 * Note that this will NOT be inside the module [[MyModule]]
 * @var {Boolean} DEBUG
 */

/** @module MyModule */

/**
 * Description can reference other classes like [[MyOtherClass]]
 * @class MyClass
 */

/** @prop {String} name A prop for the name */

/**
 * This method does some stuff
 * @method aMethod
 * @param {Number} count The amount of recursivness
 * @param {Object} [ config={ a:2, b:"Test" } ] Some random configs
 * @param {String} [ mode="Some Mode" ] The mode to use
 * @returns {Boolean} Weither or not it succeeded
 */

Changelog

[ 1.0.0 ] - 2017/08/08
  • Base parser released
[ 1.1.0 ] - 2017/08/09
  • Completed theme 'simple'
[ 1.2.0 ] - 2017/08/28
  • Completed theme 'darky'
[ 1.3.0 ] - 2017/08/31
  • Added 'filepath' and 'line' to generated doc object
  • Added source code references to theme 'darky' using new doc object