-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support JSON defined rules import #39
Comments
Here is a PR with code the handle JSON imports. No docs written yet, but if anyone has any feedback on the API let me know. |
What about just |
Also, is this useful without a way to export as well? |
@jesselee34 I think it's super useful without export. You could define a rules server that served rules to multiple applications. |
I don't like regent import because import is a reserved keyword, so you couldn't do import { import } from 'regent' And I don't want to have to do this every time import { import as importFn} from 'regent' Plus, the parse function doesn't really import anything, it returns an object of regent functions |
Basically this feature is to allow the importing of a JSON defined rules structure (similar to regent < 3.x.x
We could call
regent.import
on this rules object and the method would return an object of rules, with the value of each being a regent function. I propose that the first iteration of this not try to handle custom predicates. I can't think of a sane way to do that.The text was updated successfully, but these errors were encountered: