MCPcopy
hub / github.com/tldraw/tldraw / unfurl

Function unfurl

templates/simple-server-example/src/server/unfurl.ts:3–14  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

1import _unfurl from 'unfurl.js'
2
3export 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}

Callers 1

server.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…