amuchina
Version:
A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.
12 lines (11 loc) • 435 B
TypeScript
import type { Configuration } from './types';
declare class Amuchina {
#private;
constructor(configuration?: Configuration);
getConfiguration: () => Configuration;
sanitize: <T extends Document | DocumentFragment>(input: T) => T;
sanitizeFor: (element: string, input: string) => Element | undefined;
static getDefaultConfiguration: () => Configuration;
}
export default Amuchina;
export type { Configuration };