This repository was archived by the owner on Feb 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ function createJsonLogic() {
8686 }
8787
8888 return {
89+ apply,
8990 add_operation : addOperation ,
9091 rm_operation : removeOperation ,
9192 add_visitor : addVisitor ,
Original file line number Diff line number Diff line change @@ -26,3 +26,5 @@ function usesData(logic) {
2626
2727 return arrayUnique ( collection ) ;
2828} ;
29+
30+ export default usesData ;
Original file line number Diff line number Diff line change 11import createJsonLogic from './createJsonLogic' ;
22import * as operations from './operations' ;
33import * as visitors from './visitors' ;
4+ import isLogic from "./helpers/isLogic" ;
5+ import truthy from "./helpers/truthy" ;
6+ import getOperator from "./helpers/getOperator" ;
7+ import getValues from "./helpers/getValues" ;
8+ import usesData from "./helpers/usesData" ;
9+ import ruleLike from "./helpers/ruleLike" ;
410
511const jsonLogic = createJsonLogic ( ) ;
612
@@ -16,4 +22,12 @@ Object.keys(visitors).forEach(function(name) {
1622 jsonLogic . add_visitor ( visitor . code || name , visitor ) ;
1723} ) ;
1824
25+ // restore original public API
26+ jsonLogic . is_logic = isLogic ;
27+ jsonLogic . truthy = truthy ;
28+ jsonLogic . get_operator = getOperator ;
29+ jsonLogic . get_values = getValues ;
30+ jsonLogic . uses_data = usesData ;
31+ jsonLogic . rule_like = ruleLike ;
32+
1933export default jsonLogic ;
You can’t perform that action at this time.
0 commit comments