-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help others discover this library #12
Comments
Thank you for your contribution! I appreciate you reaching out! I'm currently on a trip, but when I get a chance I'll try to merge and release the tag changes. If I may ask: What features in Node-Rules are being used most extensively in your project? I'm curious to see if I could provide a supplementary module to complement this package to better serve some lightweight use-cases. |
In my case, I process an array of documents and emit them when matched
Conceptually it is made for processing lists and it breaks the flow into the condition stage and action stage. JsonLogic is perfect for the condition stage but has nothing to offer for processing a list of documents. Maybe this is just fine to limit the scope of the library to a document level. An example would be helpful, at the beginning, it was not clear how to use JsonLint-like libraries for lists. |
Right, definitely not on it's own! At least... not without unreasonable amounts of nesting higher order instructions & adding new methods. However, as JSON-Logic can be used to wrap any function, I have paired it successfully in the past with libraries like RxJS to create declarative pipelines to handle streams of documents, {
"map": { "var": "body" }
},
{
"filter": { ">": [{ "var": "age" }, 21] }
},
{
"bufferCount": 25
},
{
"tap": { "log": "Publishing batch of 25..." }
} I might want to provide a recipes page to show json-logic paired with libraries like Node-Rules and RxJS.
A fair point! I think there's a lot of improvement that could be done on the docs. I may prioritize this soon. |
Looks interesting. Theoretically, we could implement similar to Node-Rules flow control as custom methods. We need some examples of how to work with methods, especially parameters. |
After evaluating a number of options I luckily found your repo.
With the
.build()
method execution time went down significantly thus I'm quite happy with your library so far.For my use case, a combination of https://github.com/mithunsatheesh/node-rules and https://github.com/TotalTechGeek/json-logic-engine makes up quite a robust rules engine.
The text was updated successfully, but these errors were encountered: