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

lrcx-parser

v0.1.1

Published

TypeScript parser and serializer for the LRCX lyric format.

Readme

lrcx-parser

TypeScript parser and serializer for the LRCX v1.0 lyric format, with strictness-aware recovery modes and a preview playground.

Project Architecture

  • packages/: library source for parser, serializer, exported types, and shared utilities.
  • scripts/: local build wrappers and preview/build orchestration for TypeScript and Vite.
  • tests/: Jest coverage for parser diagnostics, serialization, and showcase compliance.
  • playground/: Vite-based preview UI for inspecting parsed output and timing behavior.
  • builds/packages/: compiled library output published to npm.
  • dist/playground/: static playground bundle for GitHub Pages.

Playground

Parser Playground: https://lrcx-dev.github.io/lrcx-parser-ts/

Local preview:

npm install
npm run dev

Get Started

Install:

npm install lrcx-parser

Parse with the default Standard mode:

import { LyricResolveMode, parseLRCX } from "lrcx-parser";

const result = parseLRCX(sourceText, LyricResolveMode.Standard);

Collect diagnostics from an explicit parser instance:

import { LRCXLooseParser } from "lrcx-parser";

const parser = new LRCXLooseParser(sourceText);
const document = parser.parse();
const errors = parser.getErrors();
const warnings = parser.getWarnings();

The library supports three parsing modes:

| Mode | Typical behavior | Result status on recoverable issues | | --- | --- | --- | | Strict | Fails fast on invalid or conflicting content. | Abort | | Standard | Keeps useful output but stops at the point where correctness is no longer guaranteed. | Partial | | Loose | Preserves as much observable content as possible for preview, migration, or repair workflows. | Fragment |

Development

Install dependencies:

npm install

Common commands:

| Command | Description | | --- | --- | | npm run clean | Remove stale library sourcemaps and delete the generated playground bundle. | | npm run build | Build the publishable library artifact: .d.ts via tsc, minified .js via Vite lib mode. | | npm run build:watch | Keep the local TypeScript compiler in watch mode for playground-oriented iteration. | | npm run build:playground | Rebuild the library and emit the static playground bundle to dist/playground/. | | npm run dev | Build once, then run the library watcher and the playground dev server together. | | npm test | Rebuild the publish artifact and run the Jest suite in-band. |

npm run dev does three things in order:

  1. Removes stale sourcemaps from the previous library build.
  2. Runs one TypeScript build into builds/packages/.
  3. Starts tsc --watch and the Vite dev server for playground/.

scripts/run-tsc.mjs is only a thin wrapper around the locally installed TypeScript CLI. It resolves typescript from node_modules and forwards the arguments unchanged.

For npm publishing, npm run build uses a different pipeline:

  1. tsc --emitDeclarationOnly writes .d.ts files into builds/packages/.
  2. Vite lib mode rebuilds packages/index.ts into minified ESM JavaScript in the same output directory.

Test

Test coverage is organized around the public library surface:

  • tests/lrcx-parser.mode-diagnostics.test.mjs: strict/standard/loose recovery semantics.
  • tests/lrcx-parser.serialize.test.mjs: serialization behavior.
  • tests/lrcx-parser.baseline-errors.test.mjs: baseline syntax and tag validation.
  • tests/lrcx-parser.showcase.test.mjs: end-to-end compliance against the showcase draft.

For packaging, npm pack and npm publish trigger prepack, which rebuilds the minified publish artifact before files are collected.

License

MIT