jsonlogic-gwm
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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);
}

Readme

Keywords

Package Sidebar

Install

npm i jsonlogic-gwm

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

291 kB

Total Files

8

Last publish

Collaborators

  • florangetwelcom