@specialblend/json-logic-ex

JsonLogic Extended

Usage no npm install needed!

<script type="module">
  import specialblendJsonLogicEx from 'https://cdn.skypack.dev/@specialblend/json-logic-ex';
</script>

README

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