lib/postcss-filter-classes.js
/**
 * Turn strings from rules to remove into a regexp to concat them later
 * @param  {Mixed Array} rulesToKeep
 * @return {RegExp Array}
 */
Turn strings from rules to remove into a regexp to concat them later
@param  {Mixed Array} rulesToKeep
@return {RegExp Array}
Turn strings from rules to remove into a regexp to concat them later @param { Mixed Array } rulesToKeep @return { RegExp Array }
function regexize (rulesToKeep) {
  var rulesRegexes = []
  for (var i = 0, l = rulesToKeep.length; i < l; i++) {
    if (typeof rulesToKeep[i] === 'string') {
      rulesRegexes.push(new RegExp('^\s*' + escapeRegExp(rulesToKeep[i]) + '\s*$'))
    } else {
      rulesRegexes.push(rulesToKeep[i])
    }
  }
  return rulesRegexes
}
function regexize ( rulesToKeep ) { var rulesRegexes = [ ] for ( var i = 0 , l = rulesToKeep . length ; i < l ; i ++ ) { if ( typeof rulesToKeep [ i ] === 'string' ) { rulesRegexes . push ( new RegExp ( '^\s*' + escapeRegExp ( rulesToKeep [ i ] ) + '\s*$' ) ) } else { rulesRegexes . push ( rulesToKeep [ i ] ) } } return rulesRegexes }
Turn strings from rules to remove into a regexp to concat them later
 @param  {Mixed Array} rulesToKeep
 @return {RegExp Array}
Turn strings from rules to remove into a regexp to concat them later @param { Mixed Array } rulesToKeep @return { RegExp Array }