Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

330 B
Raw Blame
import { normalize } from '../normalize';
import type { MatchResult } from './types';

export const matchContains = (actual: string, expected: string | undefined): MatchResult => {
  const a = normalize(actual);
  const e = normalize(expected ?? '');
  const passed = a.includes(e);
  return { passed, score: passed ? 1 : 0 };
};