0.0.2 • Published 4 years ago

@specialblend/json-logic-ex v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

json-logic-ex

JsonLogic Extended

Added features:

  • TypeScript definitions
  • RegEx support

Future features:

  • JSON Shape Matching

RegEx matching example

import jsonLogicEx from '@specialblend/json-logic-ex'

const data = {
    foo: 'this is bar',
}

const ex = {
    matchesRegEx: ['bar', { var: 'foo' }],
}

jsonLogicEx.apply(ex, data) // => true