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

mikel-jsx

v0.41.0

Published

JSX/XML style tags for mikel templating.

Readme

mikel-jsx

⚠️ Experimental. This package is a work in progress — the tag syntax, attribute rules, and public API can change at any time without notice. Not recommended for production use yet.

npm version license

A plugin for mikel that adds a JSX-style <m-name> tag for calling mikel directives (helpers and partials) from HTML-ish templates, as an alternative to the usual mustache syntax ({{# }}).

<!-- before -->
{{#header title="Hello" /}}
{{#if isAdmin}}Admin!{{/if}}

<!-- now, also available -->
<m-header title="Hello" />
<m-if isAdmin>Admin!</m-if>

Installation

# install using NPM
$ npm install mikel-jsx

# install using YARN
$ yarn add mikel-jsx
import mikel from "mikel";
import mikelJsx from "mikel-jsx";

const mk = mikel.create({ ... });

mk.use(mikelJsx());

Tag syntax

Only tags whose name starts exactly with m- are recognized; any other tag (<div>, <span>, your own custom elements) is left completely untouched.

<m-header title="Hello" />
<!-- {{#header title="Hello" /}} -->

<m-card title="Hello">
    This content is available inside the partial as {{@content}}
</m-card>
<!-- {{#card title="Hello"}}...{{/card}} -->

<m-if isAdmin>You're an admin</m-if>
<!-- {{#if isAdmin}}...{{/if}} -->

<m-each users limit="3">{{this.name}}</m-each>
<!-- {{#each users limit="3"}}...{{/each}} -->

A tag with no attributes and a self-closing slash, <m-slot />, becomes {{#slot /}} — same rule, nothing special about it.

Attributes

Each attribute is translated into a mikel argument (positional or keyword). There are just two things a value can be, and they mean the same thing whether the attribute is positional or keyword:

  • quoted ("..."): always a plain string literal. "5" and "true" stay strings.
  • braced ({...}): a raw mikel value: a variable path, a number, a boolean, a subexpression, or a spread. Whatever you put inside the braces is handed straight to mikel's own parser.

| Written as | Translates to... | Resulting type | |--------------|-------------------|----------------------------------------------------------| | name | name | positional, variable/path (dots allowed: user.name) | | key="text" | key="text" | keyword, string literal, always | | key={expr} | key=expr | keyword, raw value (variable, string, number, boolean, subexpression...) | | {expr} | expr | positional, raw value (for anything that isn't a plain identifier, e.g. {(eq a b)}) | | {...expr} | ...expr | spread |

Examples:

<m-each users limit="3">...</m-each>
<!-- {{#each users limit="3"}}...{{/each}} -->
<!-- careful: this passes the STRING "3", not the number 3 -->

<m-each users limit={3} skip={pageOffset}>...</m-each>
<!-- {{#each users limit=3 skip=pageOffset}}...{{/each}} -->

<m-user {...person} />
<!-- {{#user ...person /}} -->

Nesting

Tags can be nested arbitrarily deep — the transform always resolves the innermost pair first:

<m-card title="Outer">
    <m-if isAdmin>
        <m-each users>{{this.name}} </m-each>
    </m-if>
</m-card>

Known limitations

  • An unescaped > inside a literal attribute breaks tag recognition (no HTML-specific escaping is performed).
  • Quotes must be straight ("), not curly/typographic ( ) — check that your editor isn't auto-correcting them.
  • Only double quotes (") are recognized for attribute values, by design — single quotes ('...') are intentionally not supported.
  • Literal content inside an example <pre>/<code> block would be transformed just like any other content — there's no escape hatch.
  • The m- prefix is effectively reserved: if you already use real custom elements with that prefix, they will collide.

License

Licensed under the MIT License.