# jwadhams/json-logic-js

Build complex rules, serialize them as JSON, and execute them in JavaScript

Repository: https://github.com/jwadhams/json-logic-js
Canonical: https://ross.abutalabs.com/products/json-logic-js
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2024-07-09T15:00:20+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3984, "days_push": 785, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1479, forks 145 (observed 2026-08-28T04:04:50.699221+00:00)

## What it is
A JavaScript implementation of the JsonLogic format for building complex rules, serializing them as JSON, and executing them against data. It enables sharing the same rule logic between front-end and back-end code or storing rules in a database.

## Use cases
- evaluate business rules stored as JSON in a database
- share validation rules between frontend and backend
- build a rules engine without writing a DSL parser
- apply conditional logic to user data in JavaScript
- serialize decision logic as portable JSON
- implement feature gating or eligibility checks with data-driven rules

## When to choose
- you need rules that are serializable as JSON and portable across languages
- you want to evaluate logic against a data object in JavaScript
- you need to store rules alongside records in a database

## When to avoid
- you need high-performance expression evaluation over large datasets
- you need a full programming language or scripting engine inside your app
- your rules require operations JsonLogic does not support and you cannot add custom operators

## Facets
- artifact type: library
- maturity: stable
- function: parser, serialization
- domain: developer-tools, web-development
- platform: browser
- tags: rules-engine, logic, business-rules, rule-evaluation, automation, nodejs, javascript

## Member repositories
- jwadhams/json-logic-js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:50.699221+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:19.330065+00:00, confidence not recorded.
  - readme: https://github.com/jwadhams/json-logic-js (fetched 2026-08-28T04:04:50.699221+00:00, sha c66d708e7df8)
  - registry_npm: https://registry.npmjs.org/json-logic-js (fetched 2026-08-29T11:41:30.995727+00:00, sha b7c62d0a099b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
