MCPcopy Create free account
hub / github.com/Treeki/BirdBridge / convertTweetSource

Function convertTweetSource

conversion.ts:286–293  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

284}
285
286function convertTweetSource(source: string): Record<string, string> | null {
287 const match = /<a href="(.+)" rel="nofollow">(.+)<\/a>/.exec(source);
288 if (match) {
289 return { name: match[2], website: match[1] };
290 } else {
291 return null;
292 }
293}
294
295export function tweetToToot(tweet: Record<string, any>, globalObjects?: any): Record<string, any> {
296 const toot: Record<string, any> = {};

Callers 1

tweetToTootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected