MCPcopy Create free account
hub / github.com/027xiguapi/code-box / getMetaContentByProperty

Function getMetaContentByProperty

tools.ts:164–174  ·  view source on GitHub ↗
(metaProperty: string)

Source from the content-addressed store, hash-verified

162}
163
164export function getMetaContentByProperty(metaProperty: string) {
165 const metas = document.getElementsByTagName("meta")
166
167 for (let i = 0; i < metas.length; i++) {
168 if (metas[i].getAttribute("property") === metaProperty) {
169 return metas[i].getAttribute("content")
170 }
171 }
172
173 return ""
174}
175
176export function isValidUrl(urlString: string) {
177 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected