lib/flipValueOf.js
function flipValueOf(prop, value) {
  var RE_IMPORTANT = /\s*!important/;
  var RE_PREFIX = /^-[a-zA-Z]+-/;

  // find normalized property name (removing any vendor prefixes)
  var normalizedProperty = prop.toLowerCase().trim();
  normalizedProperty = (RE_PREFIX.test(normalizedProperty) ? normalizedProperty.split(RE_PREFIX)[1] : normalizedProperty);

  var flipFn = VALUES.hasOwnProperty(normalizedProperty) ? VALUES[normalizedProperty] : false;

  if (!flipFn) { return value; }

  var important = value.match(RE_IMPORTANT);
  var newValue = flipFn(value.replace(RE_IMPORTANT, '').trim(), prop);

  if (important && !RE_IMPORTANT.test(newValue)) {
    newValue += important[0];
  }

  return newValue;
}
function flipValueOf(prop, value) {
  var RE_IMPORTANT = /\s*!important/;
  var RE_PREFIX = /^-[a-zA-Z]+-/;

  // find normalized property name (removing any vendor prefixes)
  var normalizedProperty = prop.toLowerCase().trim();
  normalizedProperty = (RE_PREFIX.test(normalizedProperty) ? normalizedProperty.split(RE_PREFIX)[1] : normalizedProperty);

  var flipFn = VALUES.hasOwnProperty(normalizedProperty) ? VALUES[normalizedProperty] : false;

  if (!flipFn) { return value; }

  var important = value.match(RE_IMPORTANT);
  var newValue = flipFn(value.replace(RE_IMPORTANT, '').trim(), prop);

  if (important && !RE_IMPORTANT.test(newValue)) {
    newValue += important[0];
  }

  return newValue;
}
function flipValueOf ( prop , value ) { var RE_IMPORTANT = / \s*!important / ; var RE_PREFIX = / ^-[a-zA-Z]+- / ; // find normalized property name (removing any vendor prefixes) var normalizedProperty = prop . toLowerCase ( ) . trim ( ) ; normalizedProperty = ( RE_PREFIX . test ( normalizedProperty ) ? normalizedProperty . split ( RE_PREFIX ) [ 1 ] : normalizedProperty ) ; var flipFn = VALUES . hasOwnProperty ( normalizedProperty ) ? VALUES [ normalizedProperty ] : false ; if ( ! flipFn ) { return value ; } var important = value . match ( RE_IMPORTANT ) ; var newValue = flipFn ( value . replace ( RE_IMPORTANT , '' ) . trim ( ) , prop ) ; if ( important && ! RE_IMPORTANT . test ( newValue ) ) { newValue += important [ 0 ] ; } return newValue ; }
BiDi flip the value of a property.

@param {String} prop
@param {String} value
@return {String}
BiDi flip the value of a property .