yo(selector).hasClass(class)

Return true if the selector has the class defined.

If selector does not exists returns false;

If selector returns more than one, returns true for the first occurrence

if (yo('#myid').hasClass('myclass') {
    console.log('Exists');
};

Go to index