function matchingSelector(element: HTMLElement, selector: string) {
    if (!element || element.nodeType !== 1 || !element.parentElement) {
        return false;
    }

    return element.matches(selector);
}

export { matchingSelector };
