(url: string)
| 1 | import _unfurl from 'unfurl.js' |
| 2 | |
| 3 | export async function unfurl(url: string) { |
| 4 | const { title, description, open_graph, twitter_card, favicon } = await _unfurl.unfurl(url) |
| 5 | |
| 6 | const image = open_graph?.images?.[0]?.url || twitter_card?.images?.[0]?.url |
| 7 | |
| 8 | return { |
| 9 | title, |
| 10 | description, |
| 11 | image, |
| 12 | favicon, |
| 13 | } |
| 14 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…