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

@alef-prime/middot

v0.1.0-alpha.0

Published

The 13 hermeneutic principles of Rabbi Yishmael (Beraita d'Rabbi Yishmael, opening of the Sifra), encoded as logical primitives. Apply 2,000-year-old reasoning rules to modern decisions. Born from ALEF-PRIME's spiritual depth round.

Readme

@alef-prime/middot

The 13 hermeneutic principles of Rabbi Yishmael — 2,000-year-old reasoning rules, encoded.

From the opening of the Sifra (Beraita d'Rabbi Yishmael), these are the thirteen logical principles by which the Oral Torah derives Halacha from the written Torah. The same principles work surprisingly well as a vocabulary for software decisions.

import { kalVaChomer, klalUPrat, classifyMiddah, ALL_MIDDOT } from "@alef-prime/middot";

// קל וחומר · a fortiori
kalVaChomer({
  lenient: { name: "weekday prayer", has: true },
  strict:  { name: "Shabbat prayer" },
});
// → { middah: "kal_vachomer", he: "קל וחומר", applies: true,
//     conclusion: "If weekday prayer has it, then Shabbat prayer certainly has it." }

// כלל ופרט · general then specific narrows
klalUPrat({ general: "all animals", specific: "cattle" });
// → "all animals" followed by "cattle" → scope is limited to cattle.

// Classify a freeform line by which middah fits best:
classifyMiddah("If the test passes for the easy case, it must pass for the hard one too.");
// → { slug: "kal_vachomer", he: "קל וחומר", hint: "..." }

The 13 middot

| # | Slug | Hebrew | English | |---|---|---|---| | 1 | kal_vachomer | קל וחומר | A fortiori | | 2 | gezera_shava | גזירה שווה | Verbal analogy (requires mesorah) | | 3 | binyan_av_mikatuv_echad | בנין אב מכתוב אחד | Prototype from one verse | | 4 | binyan_av_mishnei_ketuvim | בנין אב משני כתובים | Prototype from two verses | | 5 | klal_u_prat | כלל ופרט | General then specific (narrows) | | 6 | prat_u_klal | פרט וכלל | Specific then general (expands) | | 7 | klal_u_prat_u_klal | כלל ופרט וכלל | General-Specific-General | | 8 | yatza_lelamed | יצא ללמד | Exception teaches the general | | 9 | yatza_k_inyano | יצא כעניינו | Exception, same matter (lenient only) | | 10 | yatza_shello_k_inyano | יצא שלא כעניינו | Exception, different matter (both ways) | | 11 | yatza_ladun_b_davar_chadash | יצא לדון בדבר חדש | Exception → new thing | | 12 | lamed_me_inyano | דבר הלמד מעניינו | Learned from context | | 13 | lamed_misofo | דבר הלמד מסופו | Learned from end / contradicting verses |

Why ship this as code?

Because logic that's been refined for two millennia is still logic. The 13 middot give you a named, traceable reasoning vocabulary for design decisions: "This refactor follows yatza_lelamed — the special case taught us something about all cases." That's better documentation than // TODO: maybe generalize this.

Caveats

  • This package encodes the principles for clarity and naming. It does NOT make halachic rulings. Real halachic application of these middot requires psak from a qualified rabbi within the framework of mesorah.
  • gezera_shava in classical use requires received tradition. The code's verbal-matching is illustrative only.
  • The principles are about deriving law from text, not legislating. Use them to name your reasoning, not to claim authority.

Try it live

n50.io/torah — interactive playground for all 13.

Status: alpha · 0.1.0

Born from ALEF-PRIME's wholeness round. Sibling of @alef-prime/audit, @alef-prime/deploy-verify, @alef-prime/i18n-pick, @alef-prime/units, @alef-prime/penalty-ledger, @alef-prime/rtl-aware. MIT.