mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-24 14:34:21 +00:00
a9c8f7431f
This now covers everything that isn't `isObject` or `typeof x === 'number'`. Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
14 lines
373 B
TypeScript
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);
|
|
}
|