UNPKG

@udus/notion-renderer

Version:
14 lines (13 loc) 422 B
import { extract, } from "@extractus/article-extractor"; export const fetchSiteMeta = async (url, parserOptions, fetchOptions) => { try { const data = await extract(url, parserOptions, fetchOptions); if (data) { return { ok: true, data }; } } catch (error) { return { ok: false, data: error }; } return { ok: false, data: new Error("article is null.") }; };