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

@jarenjs/play

v0.89.0

Published

The jaren engine playground: pick a JSON engine (JSONPath, JSON Pointer, JSON Patch, query, JSLT, markdown, mermaid, …), feed it an input and one or more datasets from a curated example library, and watch it run. Understand an engine standalone before com

Readme

@jarenjs/play

A JSON-engine playground — understand an engine before you compose it.

Pick an engine (JSONPath, JSON Pointer, JSON Patch, $query, JSLT, markdown, mermaid, a $contract document, …), feed it a source input and one or more datasets from a curated example library, and watch it run. Where @jarenjs/studio is for building an application out of many files, @jarenjs/play is for learning one engine standalone — a reference bench you experiment on first.

Two layers, the suite's convention:

  • the engine (@jarenjs/play) — headless: an engine registry, a curated example library, and a pure runExample(engineId, source, data) → { ok, panels, timing, error }. Wraps the real shipped compilers; knows nothing of the DOM.
  • the component (@jarenjs/play/component) — the playground UI, a createPlayComponent() factory (like @jarenjs/calc): a JSLT view (example rail, source editors, a dataset switcher, the run stage) the host composes.

Play is a student tool: it opens calm — one clean result per run — and drills deeper on demand. An engine's rich explainers (match cards, the compiled program, a geometry-free AST, a canonical round-trip) are deep result panels behind a quiet "Explain ▸" depth toggle: revealed beside the answer on desktop, as a full-pane swap with a ← back on a phone. And when a run fails, the error says where: the editor it is about is marked invalid and its label carries the compiler's own location — the rule of the stylesheet (at /rules/0/match), the token of the selector (at position 7), the line of the document (at line 2, column 5) — so the learner is pointed at the text to fix, not just told it is wrong (PLAY-FORMAT §2).

The model

An engine's inputs are heterogeneous — a selector needs one JSON document, a patch needs a target, markdown needs no data at all. Each engine is a descriptor (the panes it consumes + a pure run); each example presets those panes plus a list of datasets:

{ engine: 'path',
  source:   { selector: '$.store.book[*].title' },
  datasets: [ { label: 'store',   data: { data: '{ … }' } },
              { label: 'catalog', data: { data: '{ … }' } } ] }

The datasets list length is the whole story: 0 → the engine takes no data (markdown/mermaid); 1 → one dataset; N → a switcher that runs the same source over each shape. Adding an engine is a descriptor plus examples — the picker, panes and switcher all derive from the descriptor. See docs/PLAY-FORMAT.md for descriptors and results, and ARCHITECTURE.md for the state, action and run-loop contract an embedding host supplies. Query, JSLT, JTLT and XQuery expose an editable JSON externals pane.

Exports

Every subpath a consumer can import, derived from the manifest by npm run docs:derive (npm run docs:check fails when the two drift):

| Import | Kind | Declarations | |---|---|---| | @jarenjs/play | JavaScript | declared | | @jarenjs/play/component | JavaScript | declared | | @jarenjs/play/styles/play.css | asset | — | | @jarenjs/play/package.json | metadata | — |

Install

npm install @jarenjs/play

Zero third-party runtime dependencies — only other @jarenjs/* packages. Node ≥ 24, ESM.