npm.io
0.0.2 • Published 6 years ago

@specialblend/json-logic-ex

Licence
ISC
Version
0.0.2
Deps
3
Size
3 kB
Vulns
2
Weekly
0

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

Keywords