Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Ability to send params in to a custom operator

Open
#92 4 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

Start by tracing how custom operators are defined, invoked, and supplied with rule data in the repository. Use the dateTime-greater example as the target case; done should include passing unit and quantity parameters to a custom operator so different time intervals can be handled without separate operators.

Written by the indexing model from the issue text.

Description

enhancement

Ran across a use case where i wanted to know if a date was at least 5 minutes greater than another date. But if I have other cases like 10 minutes then I need to create operators for each test. If I could send in params with the operator it would allow for some pretty flexible conditions.

   {
        fact: 'date1',
        operator: {
                operation: 'dateTime-greater',
                params: {
                      unit: 'minute',
                      quantity: 5
                }
        },
        value: {
            fact: 'date2'
        }
    }
Dominant language
JavaScript
Stars
3.1k
Forks
507
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CacheControl/json-rules-engine

All issues in CacheControl/json-rules-engine

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.