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

@phenixrizen/zen-engine

v2.2.0

Published

Open-source Business Rules Engine for Node.js, powered by Rust

Readme

Node.js Rules Engine

Business logic humans can read and machines can run. One copy of your rules: the owner reads it, every system runs it.

License: MIT npm

ZEN Engine is a cross-platform, open-source Business Rules Engine (BRE) written in Rust with native Node.js bindings, alongside Python, Go, Java, Kotlin and .NET. Decisions evaluate in microseconds, run identically on every platform, and are stored as portable JSON. Loading the JSON is up to you: file system, database or service call.

Try it in the free Online Editor with a built-in simulator, or embed the open-source React JDM Editor in your own product. Learn more about the Node.js rules engine on the GoRules website.

Rules that read like sentences

Conditions are written the way the business says them, in the ZEN Expression Language. The developer view is one toggle away, and the two can never drift apart: there is only one source of truth, and this engine runs it.

Rules as graphs, or as documents

Model a decision on a visual canvas of decision tables, switches, expressions, functions and reusable sub-decisions. Or write it as a policy document with prose, typed data models and tables. Both compile to the same engine and return the same answers.

To go deeper, see the Node.js SDK documentation, the decision graph guide and the ZEN Expression Language reference.

What's new in 2.0

Version 2.0 is the first stable release of the new engine line:

  • Policy documents: model decisions as readable documents with typed data models, expressions, decision tables, match blocks and assertions. Policies compile to the same engine as graphs and return the same answers.
  • Workspace analysis: static type checking across policies and graphs. Type flow, exhaustiveness checking, write-conflict detection and precise diagnostics, all available before anything runs.
  • Per-column collect: decision table output columns can collect across all matching rows (tags[]) while the rest of the table stays first-match.
  • Pre-compiled engine: decisions are parsed and compiled once at load; evaluation is allocation-light and repeat-safe.
  • Hardened runtime: out-of-range numbers, arithmetic overflow and malformed inputs return errors or nulls instead of crashing the process.
  • Unified bindings: configurable loaders, batch evaluation and consistent error envelopes across Node.js, Python, Go and FFI consumers.

Installation

npm i @gorules/zen-engine

Prebuilt binaries ship for Linux (gnu and musl), macOS, Windows and WASM (WASI); no Rust toolchain required.

Quickstart

import { ZenEngine } from '@gorules/zen-engine';
import fs from 'fs/promises';

const content = await fs.readFile('./jdm_graph.json');
const engine = new ZenEngine();

const decision = engine.createDecision(content);
const result = await decision.evaluate({ input: 15 });
console.log(result);

Loaders

For more advanced use cases where you want to load multiple decisions and reuse them across evaluations you can build loaders. When engine.evaluate is invoked it calls the loader with a key, expecting the content of the JDM decision graph in return.

import { ZenEngine } from '@gorules/zen-engine';
import fs from 'fs/promises';
import path from 'path';

const loader = async (key: string) => fs.readFile(path.join(import.meta.dirname, 'jdm_directory', key));

const engine = new ZenEngine({ loader });
const result = await engine.evaluate('jdm_graph1.json', { input: 5 });
console.log(result);

The same pattern works for loading from a REST API, S3, a database, or anywhere else. Full guides, including multi-decision graphs and batch evaluation, are in the Node.js SDK documentation.

Other platforms

The GoRules platform

The engine is open at the core; GoRules is the platform around it. Managed cloud, self-hosted, or embedded with no network hop. SOC 2 Type II.

AI that builds rules, and stays reviewable

An AI copilot and MCP server that edits rules, runs tests and explains decisions. It never deploys. Releases stay with your reviewers.

Promote like a release, run like a binary

A release moves from testing to staging to production untouched. Approvals, instant rollback, and a paper trail for every change.

Prove it before it ships

Scenario suites run on every change, coverage is measured against decision paths, and every answer comes with a replayable trace.

Support matrix

| Arch | Node.js | |:-----------------|:-------------------| | linux-x64-gnu | :heavy_check_mark: | | linux-arm64-gnu | :heavy_check_mark: | | darwin-x64 | :heavy_check_mark: | | darwin-arm64 | :heavy_check_mark: | | win32-x64-msvc | :heavy_check_mark: | | linux-x64-musl | :heavy_check_mark: | | linux-arm64-musl | :heavy_check_mark: | | wasm32 (WASI) | :heavy_check_mark: |

Contribution

The JDM standard is growing and we need to keep tight control over its development and roadmap, as a number of companies use GoRules ZEN Engine and GoRules BRMS. For this reason we can't accept code contributions at this moment, apart from help with documentation and additional tests.

License

MIT License