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

@pvt-app/dsl

v0.0.1

Published

Pvt DSL schema — chart types, series fields, formulas, format flags, and isomorphic validators. Placeholder release reserving the scope; production API lands in 0.1.0.

Readme

@pvt-app/dsl

Schema + validators for the Pvt chart DSL.

0.0.1 is a scope-placeholder release. The public API will stabilize at 0.1.0. Pin to a specific 0.x version until 1.0 ships.

Install

npm install @pvt-app/dsl

What's inside

  • Chart type catalog — every chart type Pvt renders, with aliases, category, and capability flags.
  • Series field registry — valid DSL keys (x, y, groupby, where, format, …) with their accepted types.
  • Formula catalog — pre-agg, post-agg, and row-level formulas (sum, avg, top5, bucketnum, …).
  • Format flag catalog — every flag declared in […] bracket notation, by chart type.
  • Isomorphic validator — no Node built-ins; runs in browser, Node, CLI, and agent sandboxes.

Usage

Query the schema

const schema = require('@pvt-app/dsl');

schema.isValidChartType('bar');           // → true
schema.resolveAlias('column-chart');      // → 'column'
schema.getChartType('waterfall');         // → { category, aliases, supportsStacking, … }
schema.getChartTypesByCategory('stock');  // → ['candlestick', 'ohlc', 'timeseries', 'hlc']
schema.getAllFormulaNames();              // → ['sum', 'avg', 'median', 'top5', …]

Validate a DSL string

const { validateDSL, parseDSL } = require('@pvt-app/dsl/validators');

const result = validateDSL(`series: bar
x: State
y: GDP`);

if (!result.valid) {
  console.error(result.errors);  // [{ line, field, message, suggestion }]
}

Validate a color token

const { isValidColor } = require('@pvt-app/dsl/colors');

isValidColor('red');       // → true (HTML name)
isValidColor('#3498db');   // → true (hex)
isValidColor('c3');        // → true (palette index)
isValidColor('mauve');     // → false

Compatibility

  • Pure CommonJS; works in Node 18+.
  • Zero runtime dependencies.
  • Safe for sandboxed execution environments (Code Interpreter, Claude Code sandboxes, serverless).

Stability

This is a pre-1.0 release. The schema query API (isValidChartType, resolveAlias, etc.) is stable. The validator's error shape may evolve before 1.0.

License

ISC — see LICENSE.