jsonlogic-gwm
v1.0.3
Published
A internal package to convert jsonLogic to mongoQuery and maybe other
Downloads
3
Readme
jsonlogic-gwm
A package to parse jsonlogic into usable Object or into a mongoQuery
Usage/Examples
parseJsonLogic
import { parseJsonLogic } from 'jsonlogic-gwm';
function parseJsonLogicExec(jsonLogic: string): RuleGroupTypeAny {
return parseJsonLogic(jsonlogic);
}
formatQuery (only mongodb is supported)
import { formatQuery } from 'jsonlogic-gwm';
function formatQueryExec(myQuery: RuleGroupTypeAny): string {
return formatQuery(myQuery, 'mongodb');
}
parse and convert
import { jsonLogictoMongoQuery } from 'jsonlogic-gwm';
function jsonLogictoMongoQueryExec(jsonlogic: string): string {
return jsonLogictoMongoQuery(jsonlogic);
}