MCPcopy Create free account
hub / github.com/deta/surf / getMeta

Method getMeta

packages/web-parser/src/extractors/metadata.ts:60–63  ·  view source on GitHub ↗
(name: string, property: string)

Source from the content-addressed store, hash-verified

58 const metadata = this.extractMetaTagsFromDocument(document)
59
60 const getMeta = (name: string, property: string) => {
61 const tag = metadata.find((tag) => tag.name === name || tag.property === property)
62 return tag?.content
63 }
64
65 const favicon = document.querySelector('link[rel="icon"]')?.getAttribute('href')
66 const language = document.querySelector('html')?.getAttribute('lang')

Callers 3

addProseMirrorPluginsFunction · 0.80
addProseMirrorPluginsFunction · 0.80
autolinkFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected