From 488cc76dda591446f08fb507fe83b8dd04a7e0ad Mon Sep 17 00:00:00 2001 From: Beef Date: Sun, 8 Jan 2023 23:22:10 +0000 Subject: [PATCH] [Metro > Filters] Add findByStoreName --- src/lib/metro/filters.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/metro/filters.ts b/src/lib/metro/filters.ts index 67a9cf5..5d226c5 100644 --- a/src/lib/metro/filters.ts +++ b/src/lib/metro/filters.ts @@ -82,4 +82,5 @@ const dNameFilter = (name: string, defaultExp: boolean) => (defaultExp ? (m: any export const findByProps: PropsFinder = (...props) => find(propsFilter(props)); export const findByPropsAll: PropsFinderAll = (...props) => findAll(propsFilter(props)); export const findByDisplayName = (name: string, defaultExp = true) => find(dNameFilter(name, defaultExp)); -export const findByDisplayNameAll = (name: string, defaultExp = true) => findAll(dNameFilter(name, defaultExp)); \ No newline at end of file +export const findByDisplayNameAll = (name: string, defaultExp = true) => findAll(dNameFilter(name, defaultExp)); +export const findByStoreName = (storeName: string) => find((m: any) => m.getName?.() === storeName); \ No newline at end of file