src/shared/utils/dsl/index.js
/**
 * Parse a structured expression and return a function that expects
 * to be called with the current state data for validation
 *
 * @param {*} expression
 */
Parse a structured expression and return a function that expects
to be called with the current state data for validation

@param {*} expression
Parse a structured expression and return a function that expects to be called with the current state data for validation @param { * } expression
function parse(expression, topLevel = true) {
  if (topLevel) {
    validateExpression(expression);
  }
  return buildValidatorFunction(expression);
}
function parse ( expression , topLevel = true ) { if ( topLevel ) { validateExpression ( expression ) ; } return buildValidatorFunction ( expression ) ; }
Parse a structured expression and return a function that expects
 to be called with the current state data for validation
Parse a structured expression and return a function that expects to be called with the current state data for validation
// Validate expression first. Otherwise we would need loads of // redundant tests in the validation function builder.. // A-OK, let's build the function! 🎸