DavyJonesLocker/client_side_validations-simple_form

View on GitHub
src/utils.js

Summary

Maintainability
A
1 hr
Test Coverage
export const addClass = (element, customClass) => {
  if (customClass) {
    element.classList.add(...customClass.split(' '))
  }
}

export const removeClass = (element, customClass) => {
  if (customClass) {
    element.classList.remove(...customClass.split(' '))
  }
}

export default {
  addClass,
  removeClass
}