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

lite-usfm

v0.3.0

Published

Zero-dependency, minimal-assumption USFM-to-JSON parser.

Readme

lite-usfm

lite-usfm is a superlite, zero-dependency USFM-to-JSON parser that makes minimal assumptions about the semantic meaning of the source text.

While other parsers impose semantic meaning on the markers in the source text in order to produce a more friendly output, lite-usfm imposes minimal meaning on the source syntax - a tag in is a tag out. This makes it more suitable for handling non-standard markers.

Usage

The parser can be invoked in one of two ways.

Return the parsed tags in an array:

const UsfmJsonParser = require("lite-usfm")
const array = new UsfmJsonParser().parse("\v USFM text")

Call a callback for each parsed line in order:

const UsfmJsonParser = require("lite-usfm")
const callback = (line) => { console.log(line) }
new UsfmJsonParser().parse("\v USFM text", callback)

Output Format

The output is an array of objects. Each object represents one marker line. The objects will have the following properties:

  • tag: (string) The tag (e.g. 'v')
  • tagClass: (string) The tag, without any trailing numbers.
  • level: (number|undefined) Trailing numbers from the tag.
  • contentRaw: (string) Unparsed content of the tag.
  • num: (number) For 'v' and 'c' tags, the verse or chapter number.
  • content: (array) Parsed content of the tag. This array will contain either strings or character marker objects. Character markers have:
    • tag: (string) The tag (e.g. 'f')
    • content: The content of the tag. This may again be an array of strings and character markers.
    • params: The attributes of the tag. If there is a default (unnamed) parameter, it will be named _default.