index.js
function createPrefixedRule(rule, prefix) {
  const prefixLength = prefix.length;
  const selectorStart = rule.selector.slice(1, prefixLength + 1);
  const isAlreadyPrefixed = selectorStart === prefix;
  if (isAlreadyPrefixed) return false;

  return rule.clone({
    selector: `.${prefix + rule.selector.substring(1)}`,
  });
}
function createPrefixedRule(rule, prefix) {
  const prefixLength = prefix.length;
  const selectorStart = rule.selector.slice(1, prefixLength + 1);
  const isAlreadyPrefixed = selectorStart === prefix;
  if (isAlreadyPrefixed) return false;

  return rule.clone({
    selector: `.${prefix + rule.selector.substring(1)}`,
  });
}
function createPrefixedRule ( rule , prefix ) { const prefixLength = prefix . length ; const selectorStart = rule . selector . slice ( 1 , prefixLength + 1 ) ; const isAlreadyPrefixed = selectorStart === prefix ; if ( isAlreadyPrefixed ) return false ; return rule . clone ( { selector : ` ${ prefix + rule . selector . substring ( 1 ) } ` , } ) ; }
Creates a PostCSS rule based on breakpoint options
@param {Object} rule PostCSS rule to duplicate
@param {Object} prefix Prefix for selector
@return {Object} Responsified PostCSS rule
Creates a PostCSS rule based on breakpoint options