{"version":3,"file":"findReverse.mjs","names":[],"sources":["../../../src/utils/findReverse.ts"],"sourcesContent":["/** Returns the last item that satisfies `matches`, or `undefined`. */\nexport const findReverse = <T>(\n  items: T[],\n  matches: (items: T) => boolean,\n): T | undefined => {\n  for (let i = items.length - 1; i >= 0; i -= 1) {\n    if (matches(items[i])) {\n      return items[i];\n    }\n  }\n\n  return undefined;\n};\n"],"mappings":";;AACA,IAAa,eACX,OACA,YACkB;CAClB,KAAK,IAAI,IAAI,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAC1C,IAAI,QAAQ,MAAM,EAAE,GAClB,OAAO,MAAM;AAKnB"}