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

lime-csr-js

v0.1.5

Published

An HTML-first client-side rendering engine built with standard browser APIs.

Readme

lime-csr.js

An HTML-first client-side rendering engine built with standard browser APIs. Templates stay in HTML; the small ESM runtime provides reactive state, bindings, structural blocks, and delegated events without expression eval.

Why?

lime-csr.js is for browser-first pages that benefit from declarative HTML but do not need a compiler, virtual DOM, router, or framework runtime. Source modules run directly in modern browsers during development; a bundled ESM file is included for production convenience.

Installation

npm install lime-csr-js

Package consumers import the public entry point:

import { createStore, mount } from 'lime-csr-js';

The repository-only source import below is useful when cloning this project; it is not the recommended import path from an installed npm package.

import { createStore, mount } from './src/index.js';

Quick Start

<template id="tpl-counter">
  <button data-on-click="increment">
    Count: <span data-text="count"></span>
  </button>
</template>
<main id="app"></main>

<script type="module">
  import { createStore, mount } from 'lime-csr-js';

  const store = createStore({ count: 0 });
  mount('counter', {}, document.getElementById('app'), store, {
    handlers: {
      increment() {
        store.update('count', (count) => count + 1);
      },
    },
  });
</script>

Core Concepts

  • createStore(initialState) exposes get, set, update, subscribe, and computed for path-based reactive state.
  • ${path} is static interpolation from the context passed to mount.
  • data-text, data-model, data-show, and {x}/data-x read reactively from the store.
  • <if>, <for>, and <partial> are structural template elements. Add data-live to <if> or keyed <for> blocks when the store should update them.
  • data-on-click, data-on-input, data-on-change, data-on-submit, and data-on-keydown use event delegation and named handler functions.
  • data-lime-ignore is an escape hatch: any element with this attribute and its entire subtree are invisible to the engine, useful for embedding third-party widgets (Turnstile, reCAPTCHA, etc.) that manage their own DOM.

See DOCS.md for all syntax, lifecycle semantics, error codes, and limitations.

Browser / CDN Usage

Development can import repository source files with a relative module path. For production, use the bundled ESM file from the published npm package:

<script type="module">
  import { createStore, mount } from
    'https://cdn.jsdelivr.net/npm/lime-csr-js@<published-version>/dist/index.min.js';
</script>

Replace <published-version> with an exact published version (for example, the version in the release tag). Do not use @latest in production. The dist/index.min.js path is present in the npm tarball and is browser-native ESM; jsDelivr will serve that same file after npm publication.

API Overview

const cleanup = mount(templateName, context, target, store, options);
unmount(target);
cleanup();

Calling mount again for the same target cleans up the previous mount first. Both cleanup() and unmount(target) cancel store subscriptions, model listeners, and delegated event listeners.

Examples

Open the HTML files in examples through a local static server. They import ../src/index.js and are intended for repository development.

Runtime Support

Modern browsers with native ES modules, <template>, WeakMap, Map, and standard DOM APIs are required. The npm development toolchain requires Node 20.19 or newer.

Security

Template paths and event attributes are identifiers, not JavaScript expressions: the runtime does not use eval or new Function. Interpolated text is assigned through DOM text APIs, reactive event-handler attributes are rejected, and reactive URL attributes permit only http, https, root-relative, or fragment URLs. Templates remain application-authored HTML; do not insert untrusted HTML into template markup.

Known Limitations

<if>, <for>, and <partial> should not be placed directly in tables due to HTML parser foster parenting. Live condition branches are rebuilt when the condition changes, and live lists require unique keys. See the detailed limitations in DOCS.md.

Technical Documentation

DOCS.md is the complete public reference. Documentation and implementation are expected to agree; report a mismatch as a bug.

Development

npm ci
npm run lint
npm run typecheck
npm test
npm run build
npm pack --dry-run

npm run build creates the production ESM bundle. prepack runs that build, so npm pack and npm publish cannot package a stale bundle.

License

MIT — see LICENCE.md.