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

html-tag-audit

v1.0.2

Published

html tag auditing tool

Readme

html-tag-audit

A tool to audit all html files in a given directory and output their tags and attributes.

Usage

Run this command from the directory you want to start the audit on:

npx html-tag-audit

Or define the directory to start in (-sd/--start-dir):

npx html-tag-audit -sd ./dir/to/start

The default behavior is to ignore html tags and obvious angular tags as this project was built to audit angular apps. Change the blacklist if an alternative output is desired (-B/--blacklist):

# accepted values: all, ng, html, none
# skip over html tags and attributes:
npx html-tag-audit --blacklist html

View tag blacklist and attributes blacklist

Available Flags

Flags are also viewable with the --help flag

  • -sd, --start-dir <dir> - change starting directory (default: ./)
  • -nf, --no-file-output - disable file output
  • -fd, --file-output-dir <dir> - change output file directory (default: ./)
  • -fn, --filename <filename> - change output file name (default: html-tag-audit)
  • -ft, --filetype <filetype> - change output file type [json, md, csv, txt] (default: json)
  • -s, --sort <type> - sort results [tag, count] (default: tag)
  • -lr, --log-results - log audit results
  • -lp, --log-path - log current path
  • -B, --blacklist <list> - change audit blacklist [all, none, ng, html] (default: all)
  • -lt, --log-tags <list> - log blacklisted tags without running audit [all, ng, html]
  • -la, --log-attributes <list> - log blacklisted attributes without running audit [all, ng, html]

Output

Running the command with no flags will output the audit results to a file named html-tag-audit.json. The file type can be changed by passing an accepted type to the -ft flag.

Example

A file exists as ./html-files/test.html and contains:

<app-html-tag (onclick)="clickme()" [disabled]="false"></app-html-tag>
<app-html-tag styleclass="example-class" randAttribute="someValue"></app-html-tag>

Executing npx html-tag-audit -sd ./html-files results in this output:

# html-tag-audit.json
{
  "app-html-tag": {
    "count": 2,
    "attributes": [
      "(onclick)",
      "[disabled]",
      "styleclass",
      "randattribute"
    ]
  }
}

Or to output as a markdown file instead, run npx html-tag-audit -sd ./html-files -ft md:

# html-tag-audit.md
|Tag|Count|Attributes|
|---|---:|---|
|app-html-tag|2|(onclick),[disabled],styleclass,randattribute|

Preview: |Tag|Count|Attributes| |---|---:|---| |app-html-tag|2|(onclick),[disabled],styleclass,randattribute|