@devmehq/open-graph-extractor
Version:
Fast, lightweight Open Graph, Twitter Card, and structured data extractor for Node.js with caching and validation
30 lines (29 loc) • 904 B
TypeScript
import type { ISecurityOptions } from "./types";
/**
* Sanitize HTML content using Cheerio (Node.js only, no browser dependencies)
*/
export declare function sanitizeHtml(html: string, options?: ISecurityOptions): string;
/**
* Validate URL for security
*/
export declare function validateUrl(url: string, options?: ISecurityOptions): boolean;
/**
* Detect PII in text
*/
export declare function detectPII(text: string): {
hasPII: boolean;
types: string[];
matches: Record<string, string[]>;
};
/**
* Mask PII in text
*/
export declare function maskPII(text: string, options?: ISecurityOptions): string;
/**
* Sanitize extracted data
*/
export declare function sanitizeExtractedData(data: Record<string, unknown>, options?: ISecurityOptions): Record<string, unknown>;
/**
* Normalize URLs for consistency and security
*/
export declare function normalizeUrl(url: string): string;