src/index.js
function convert(object) {
  return Object.keys(object).reduce((newObj, originalKey) => {
    let originalValue = object[originalKey]
    if (isString(originalValue)) {
      // you're welcome to later code 😺
      originalValue = originalValue.trim()
    }

    // Some properties should never be transformed
    if (includes(propsToIgnore, originalKey)) {
      newObj[originalKey] = originalValue
      return newObj
    }

    const {key, value} = convertProperty(originalKey, originalValue)
    newObj[key] = value
    return newObj
  }, Array.isArray(object) ? [] : {})
}
function convert(object) {
  return Object.keys(object).reduce((newObj, originalKey) => {
    let originalValue = object[originalKey]
    if (isString(originalValue)) {
      // you're welcome to later code 😺
      originalValue = originalValue.trim()
    }

    // Some properties should never be transformed
    if (includes(propsToIgnore, originalKey)) {
      newObj[originalKey] = originalValue
      return newObj
    }

    const {key, value} = convertProperty(originalKey, originalValue)
    newObj[key] = value
    return newObj
  }, Array.isArray(object) ? [] : {})
}
function convert ( object ) { return Object . keys ( object ) . reduce ( ( newObj , originalKey ) => { let originalValue = object [ originalKey ] if ( isString ( originalValue ) ) { // you're welcome to later code 😺 originalValue = originalValue . trim ( ) } // Some properties should never be transformed if ( includes ( propsToIgnore , originalKey ) ) { newObj [ originalKey ] = originalValue return newObj } const { key , value } = convertProperty ( originalKey , originalValue ) newObj [ key ] = value return newObj } , Array . isArray ( object ) ? [ ] : { } ) }
converts properties and values in the CSS in JS object to their corresponding RTL values
@param {Object} object the CSS in JS object
@return {Object} the RTL converted object
converts properties and values in the CSS in JS object to their corresponding RTL values