
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
@types/html-parser
Advanced tools
TypeScript definitions for html-parser
npm install --save @types/html-parser
This package contains type definitions for html-parser (https://www.npmjs.com/package/html-parser).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-parser.
export type Callback = (arg: any) => any;
export type Token = ">" | "/>" | "?>";
export interface CallbacksOption {
attribute?(name: string, value: any): void;
openElement?(tagName: string): void;
closeOpenedElement?(tagName: string, token: Token, isUnary: boolean): void;
closeElement?(name: string): void;
comment?(content: string): void;
docType?(content: string): void;
cdata?(content: string): void;
xmlProlog?(): void;
text?(value: string): void;
}
export interface RegExpOptions {
name?: RegExp | undefined;
attribute?: RegExp | undefined;
}
export interface RemovalCallback {
attributes?: Callback | string[];
elements?: Callback | string[];
comments?: Callback | boolean;
docTypes?: Callback | boolean;
}
export function parse(htmlString: string, callbacks?: CallbacksOption, regex?: RegExpOptions): void;
export function parseFile(
fileName: string,
encoding: string | undefined,
callbacks: CallbacksOption,
callback: Callback,
): void;
export function sanitize(htmlString: string, removalCallbacks?: RemovalCallback): string;
These definitions were written by Vladimir Grenaderov https://github.com/VladimirGrenaderov, // Max Boguslavskiy.
FAQs
TypeScript definitions for html-parser
We found that @types/html-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.