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

reference-coverage-tester

v0.4.0

Published

A tool to test the documentation and sample coverage for DocFX YML files.

Readme

reference-coverage-tester [WIP]

A tool to test the documentation and sample coverage for DocFX YML files. This tool is designed by and for the Office Platform content team (OP Content) to measure the effectiveness of the reference documentation in office-js-docs-reference and office-scripts-docs-reference.

Purpose

Currently, the primary purpose of this tool is to measure sample coverage. OP Content has the philosophy that developers prioritize API reference documentation and samples. By ensuring the two are found together, we provide higher educational potential.

The output is a .csv file with package-organized data that shows meaningful coverage against a well-defined success metric. In OP Content, we weight the API pages against their page views to determine high-value samples and sample opportunities.

Usage

Command Line Interface

reference-coverage-tester <config-file-path>

Parameters:

  • <config-file-path>: Path to the JSON configuration file

Example:

reference-coverage-tester ./config.json

Configuration File

The tool requires a JSON configuration file with the following structure:

{
    "inputFolders": [
        "./path/to/yaml/files"
    ],
    "outputFolder": "./output",
    "notIncludedPatterns": [
        "*.interfaces.*",
        "temp-*",
        "**/draft/**"
    ]
}

Configuration Options:

  • inputFolders: Array of directory paths containing DocFX YAML files to analyze. The tool will recursively scan all subdirectories for .yml and .yaml files.
  • outputFolder: Directory where the CSV report will be generated (as "API Coverage Report.csv").
  • notIncludedPatterns: Array of wildcard patterns to exclude files from analysis. Files whose paths match any of these patterns will be skipped. Supports * (matches any characters) and ? (matches single character) wildcards.

Wildcard Pattern Examples:

  • *.interfaces.* - Excludes files with ".interfaces." anywhere in the filename
  • temp-* - Excludes files starting with "temp-"
  • **/draft/** - Excludes any files in "draft" directories at any level
  • test?.yml - Excludes files like "test1.yml", "testA.yml", but not "test10.yml"

Note: The tool automatically excludes toc.yml files and invalid YAML files during processing.

Contributions and maintenance

Contributions are welcome. The current scope is one team and two repos. The documentation there has some level of customization, so improvements to this tool would need to keep that in mind.

Understanding the CSV file

Each row of the CSV has these values: Package,Class,Field,Type,Description Rating,Has Example?

  • Package: The name of the package that contains the API element. For package-level entries, this shows the package name itself.
  • Class: The name of class, interface, or enum. For package-level entries, this shows "N/A".
  • Field: The name of the property, method, or enum field. "N/A" represents the row for the class or package description.
  • Type: What category of API element this is (Package, Class, Interface, Enum, Method, Property, etc.).
  • Description Rating: An automated evaluation of the JSDoc description quality. Could be "Missing", "Poor", "Fine", "Good", "Great", "Excellent". "Deprecated" is given if the @deprecated tag is found.
  • Has Example?: A boolean of whether there is example code associated with this API.

Description Rating Logic

  • Class/Interface/Package-level ratings (rows with "N/A" in the Field column): Based solely on the class's own summary description, not influenced by individual property or method descriptions.
  • Property/Method/Field-level ratings: Based on the individual item's own description.

This separation ensures that a class with a good summary description gets a good rating even if some of its properties or methods have poor descriptions, and vice versa.