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

lexify

v1.0.5

Published

Converts lexicon md files to HTML and JSONLD. Built for TC-53 to make lexicon maintenance easy.

Downloads

17

Readme

lexify

Converts lexicon md files to HTML and JSONLD. Lexicon md files are compact format definition lists and the generated HTML will include RDFa microformatting and the JSONLD will be valid based on specs from schema.org.

Usage

lexify is intended to be run via npx in a properly prepared directory.

npx lexify [src] [dest] [template]

[src] is a directory or markdown file. If a directory is passed all md files in the directory will be parsed (default ./src)

[dest] is a destination directory (default ./docs)

[template] is the mustache template for the HTML page (default ./template/lexicon.mustache)

Everything in the dest folder is generated by lexify, just make sure the folder exists.

A properly formatted src file is a compact format definition list with one term per line. You can add HTML into either the term or definition. It has a markdown extension so that it is nice and readable in github, but it's really just HTML. Here is a properly formatted src file:

<dl>Baseball Pitching Terms
<dt><a href="https://authoritativeSource.com">Fastball</a><dd>A pitch thrown at or near maximum speed
<dt>Change Up<dd>A pitch that mimics a fastball's mechanics, but is held deeper in the hand so that it arrives more slowly and throws off the batters timing.
<dt>Curve Ball<dd>A pitch thrown with forward rotation that causes it to dive before reaching the batter.

lexify uses the Mustache templating language. Since Mustache is "logic-less" we can't just pass in the json-ld as the view (Boo!). We have to pass in a view that fits the following format. Don't worry, this is done behind the scenes, it's provided here as a reference for your own Mustache template:

lexica: [
  {
    termset: [{
      "@type":[String],
      "@id":String,
      "name":String
    }],
    terms: [{
      "@type": String,
      "@id": String,
      "name": String,
      "description": String,
      "inDefinedTermSet": String
    },
    ...
    ]
  }
]

If there are multiple lexicon markdown files, they will be concatentated into one view and passed to the Mustache template as additional elements in the lexica array.

You will need a template/lexicon.mustache file that is used to render the HTML. Here's a starting point, but feel free to make it yours:

<h1>My Awesome List of Terms</h1>

{{#lexica}}
  <dl vocab="http://schema.org/">
  {{#termset}}
    <div typeof="{{@type}}">
      <h2>
        <a property="itemid" href="{{& @id}}"><span property="name">{{name}}</span></a>
      </h2>
    </div>
  {{/termset}}
  {{#terms}}
    <div typeof="DefinedTerm">
      <link property="url" href="{{& @id}}"/>
      <dt property="name">{{name}}</dt>
      <dd property="description">{{description}}</dd>
      <link property="inDefinedTermSet" href="{{#termset}}{{& @id}}{{/termset}}" />
    </div>
  {{/terms}}
  </dl>
{{/lexica}}