UNPKG

es-query

Version:

An utilitarian library for DOM manipulation using ECMAScript 7 Function Bind Syntax

13 lines (9 loc) 284 B
function removeClass (className) { if (this.classList) { this.classList.remove(className); } else { this.className = this.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); } return this; } export default removeClass;