UNPKG

@jss-rule-engine/core

Version:

Rule engine for Sitecore JSS

10 lines (8 loc) 372 B
import { RuleEngineContext } from "../types/ruleEngine"; export default async function(operatorContext:any, _ruleContext: RuleEngineContext) { if(typeof(operatorContext.parameter1) != "string" || typeof(operatorContext.parameter2) != "string"){ return false; } return operatorContext.parameter1.endsWith(operatorContext.parameter2); }