anya/tools/meta-fetcher.ts

12 lines
326 B
TypeScript
Raw Normal View History

2024-10-06 13:56:33 +05:30
import metaFetcher from "meta-fetcher";
import { z } from "zod";
// get meta data from url
export const MetaFetcherParams = z.object({
url: z.string(),
});
export type MetaFetcherParams = z.infer<typeof MetaFetcherParams>;
export async function meta_fetcher({ url }: MetaFetcherParams) {
return await metaFetcher(url);
}