0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 05:28:35 +00:00
renovatebot_renovate/lib/util/html.ts
Michael Kriese c5d50f6da3
refactor: more esm imports (#13233)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2021-12-22 11:28:20 +00:00

13 lines
321 B
TypeScript

import type { HTMLElement, Options } from 'node-html-parser';
import _parse from 'node-html-parser';
export type { HTMLElement, Options };
export function parse(html: string, config?: Partial<Options>): HTMLElement {
if (typeof config !== 'undefined') {
return _parse(html, config);
}
return _parse(html);
}