CacheControl / CacheControl/json-rules-engine
Ability to send params in to a custom operator
- 主要語言
- JavaScript
- 星號
- 3.1k
- 分支
- 507
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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'
}
}
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
先追蹤 repository 中自訂運算子的定義、呼叫方式,以及如何提供規則資料給它們。以 dateTime-greater 範例作為目標案例;完成內容應包括將 unit 和 quantity 參數傳遞給自訂運算子,以便在不使用個別運算子的情況下處理不同的時間間隔。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- backend
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100