contains

fun contains(token: T): Boolean(source)

The contains() method of the DOMTokenList interface returns a boolean value — true if the underlying list contains the given token, otherwise false.

MDN Reference