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

replicant-squint

v0.1.0

Published

Replicant-style hiccup renderer for SquintJS.

Readme

Replicant Squint

Disclosure: This library was written by Codex GPT 5.5, based on the Clojure Replicant library.

A small Replicant-style hiccup renderer for SquintJS.

This is not a drop-in port of Replicant. It keeps the useful shape of the API and rendering model, but avoids ClojureScript-only features such as protocols, reader-conditionals, and macros.

Install

npm install replicant-squint squint-cljs

replicant-squint ships precompiled ESM in dist/ and Squint source in src/.

NPM / bundler usage

Use package subpath imports from Squint code:

(ns app
  (:require ["replicant-squint/dom" :as r]))

(r/render js/document.body
  [:main#app.page
   [:h1 "Hello"]
   [:button {:on {:click #(js/console.log "clicked")}}
    "Click"]])

The package root also exports replicant.dom, so this works too:

(ns app
  (:require ["replicant-squint" :as r]))

Browser / import-map usage

For Squint playground-style code that imports namespaces like replicant.dom, map those bare imports to the published ESM files:

<script type="importmap">
{
  "imports": {
    "squint-cljs/core.js": "https://unpkg.com/[email protected]/src/squint/core.js",
    "replicant.dom": "https://unpkg.com/[email protected]/dist/replicant/dom.mjs",
    "replicant.alias": "https://unpkg.com/[email protected]/dist/replicant/alias.mjs",
    "replicant.string": "https://unpkg.com/[email protected]/dist/replicant/string.mjs"
  }
}
</script>

Then your Squint code can use normal namespace requires:

(ns app
  (:require [replicant.dom :as r]))

(r/render js/document.body [:h1 "Hello"])

Alias-style components

(ns app
  (:require ["replicant-squint/alias" :as alias]
            ["replicant-squint/dom" :as r]))

(alias/register! :ui/button
  (fn [attrs children]
    (into [:button.button attrs] children)))

(r/render js/document.body [:ui/button {:type "button"} "Save"])

API

  • replicant.dom/render el hiccup & [opts]
  • replicant.dom/unmount el
  • replicant.dom/set-dispatch! f
  • replicant.dom/recall node
  • replicant.alias/register! k f
  • replicant.alias/get-registered-aliases
  • replicant.alias/expand-1
  • replicant.string/render hiccup & [opts]

Supported render features include tag id/class shorthand, attrs, style maps with automatic px for numeric values, event handlers in :on, keyed child movement with :replicant/key, SVG namespace handling, aliases, and basic lifecycle hooks (:replicant/on-render, :replicant/on-mount, :replicant/on-update, :replicant/on-unmount).

Develop

npm install
npm test
npm run build

The source is in src/replicant/*.cljs. Build output goes to dist/.

Before publishing, check the package contents:

npm pack --dry-run

Current limitations

  • Squint compiles keywords to strings, so the implementation treats hiccup tags and attr keys as strings internally.
  • Replicant's dev assertions, macros, protocol renderer abstraction, async mounting/unmounting transitions, and CLJ/CLJS dual string renderer are intentionally not ported here.
  • Alias helpers are functions, not macros. Use alias/register! instead of defalias.