(function () {
  function InvalidArgument (message) {
    this.message = message;
    this.name = 'InvalidArgument';
  }

  function isNumeric (number) {
    return !isNaN(number);
  }

  function convertTranslate (values) {
    var valuesArray = values.split(' ');
    var numValues = valuesArray.length;

    if (numValues > 3) {
      throw new InvalidArgument('Too many values for translate');
    }

    for (var i = 0; i < numValues; i++) {
      var elementLength = valuesArray[i].length;
      if (elementLength <= 2) {
        throw new InvalidArgument('Incorrect argument for translate');
      }

      // Check if units are px
      var unit = valuesArray[i].substring(elementLength - 2, elementLength);
      if (unit !== 'px') {
        throw new InvalidArgument('Incorrect units for translate');
      }

      // Check if characters before 'px' are valid numbers
      var number = valuesArray[i].substring(0, elementLength - 2);
      if (!isNumeric(number)) {
        throw new InvalidArgument('Argument must be a number');
      }
    }

    return 'translate(' + valuesArray.join(', ') + ')';
  }

  function toTransform (properties) {
    var result = '';

    if (properties.translate !== undefined && properties.translate !== 'none') {
      result += convertTranslate(properties.translate);
    }
    return result;
  }

  window.InvalidArgument = InvalidArgument;
  window.toTransform = toTransform;
})();

@@ -214,24 +214,101 @@
  (values) %7B%0A
+    if (values === undefined %7C%7C values === 'none') %7B%0A      return '';%0A    %7D%0A%0A
     var valu
@@ -1247,110 +1247,28 @@
 t = 
-''
+%5B%5D
 ;%0A
-%0A
     
-if (properties.translate !== undefined && properties.translate !== 'none') %7B%0A      result += 
+result.push(
 conv
@@ -1301,23 +1301,18 @@
 anslate)
+)
 ;
-%0A    %7D
 %0A    ret

Resolved if statement