Files
renovate/lib/util/html.ts
Jamie Tanna a9c8f7431f fix(lint): extend prefer-is-helpers to catch more cases (#45474)
This now covers everything that isn't `isObject` or `typeof x === 'number'`.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-08-26 10:48:40 +00:00

14 lines
373 B
TypeScript

import { isUndefined } from '@sindresorhus/is';
import type { HTMLElement, Options } from 'node-html-parser';
import { parse as _parse } from 'node-html-parser';
export type { HTMLElement, Options };
export function parse(html: string, config?: Partial<Options>): HTMLElement {
if (!isUndefined(config)) {
return _parse(html, config);
}
return _parse(html);
}