UNPKG

vevet

Version:

Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.

21 lines (16 loc) 374 B
import { ISplitTextStaticProps } from '../types'; export function isIgnored( element: HTMLElement, ignore: ISplitTextStaticProps['ignore'], ) { if (!ignore) { return false; } if (typeof ignore === 'string') { return element.matches(ignore); } if (typeof ignore === 'function') { return ignore(element); } return ignore.includes(element); }