Utility Classes

class SuperTools {
  static hasClass(elm, classN) {
    return new RegExp('(\\s|^)' + classN + '(\\s|$)').test(elm.classN);
  }
  static getCssProperty(elm, prop) {
    return window.getComputedStyle(elm, null).getPropertyValue(prop);
  }
}
SuperTools.hasClass(elm, 'class-name');
🛠️ with ❤️ by Ash Hitchcock © 2020 | Uses