@jcottam/html-metadata
Version:
This JavaScript library simplifies the extraction of HTML Meta and OpenGraph tags from HTML content or URLs.
11 lines (10 loc) • 362 B
TypeScript
export type Options = {
baseUrl?: string;
timeout?: number;
metaTags?: string[];
};
export type ExtractedData = {
[key: string]: string;
};
export declare const extractFromHTML: (html: string, options?: Options | undefined) => ExtractedData;
export declare const extractFromUrl: (url: string, options?: Options) => Promise<ExtractedData | null>;