
define(['jquery'], function() {
    'use strict';

    $.fn.removePrefixedClasses = function(prefix) {

        return this.each(function() {
            var el = $(this),
                classes = el[0].className.split(/\s+/),
                prefixes = prefix.split(/\s+/);

            classes.forEach(function(cls) {
                prefixes.forEach(function(prefix) {
                    if (cls.indexOf(prefix) === 0) {
                        el.removeClass(cls);
                    }
                });
            });
        });
    };
});

@@ -268,16 +268,47 @@
 t(/%5Cs+/)
+,%0A                toRemove = %5B%5D
 ;%0A%0A     
@@ -479,22 +479,21 @@
     
-el.r
+toR
 emove
-Class
+.push
 (cls
@@ -545,32 +545,80 @@
             %7D);%0A
+            el.removeClass(toRemove.join(' '));%0A
         %7D);%0A    

Improve performance of remove prefixedclasses