src/lib/rules.js
// Dispatch the condition to the right method based on the condition's type.
Dispatch the condition to the right method based on the condition's type.
Dispatch the condition to the right method based on the condition ' s type .
function dispatchCondition(condition, methods, ...args) {
  const type = condition.get('type');
  if (methods.has(type)) {
    const method = methods.get(type);
    return method(condition, ...args);
  } else {
    throw new Error('Unknown condition type: ' + type);
  }
}
function dispatchCondition ( condition , methods , ... args ) { const type = condition . get ( 'type' ) ; if ( methods . has ( type ) ) { const method = methods . get ( type ) ; return method ( condition , ... args ) ; } else { throw new Error ( 'Unknown condition type: ' + type ) ; } }
Dispatch the condition to the right method based on the condition's type.
Dispatch the condition to the right method based on the condition ' s type .