File "hasClass.ts"
Full path: /home/fsibplc/public_html/sommilito-bank2/splide-4.1.3/src/js/utils/dom/hasClass/hasClass.ts
File
size: 393 B (393 B bytes)
MIME-type: text/plain
Charset: utf-8
Download Open Edit Advanced Editor Back
/**
* Checks if the element contains the specified class or not.
*
* @param elm - An element to check.
* @param className - A class name that may be contained by the element.
*
* @return `true` if the element contains the class, or otherwise `false`.
*/
export function hasClass( elm: Element, className: string ): boolean {
return elm && elm.classList.contains( className );
}