getType = (value) => {
  if (value === 'auto') {
    return {
      type: value,
      value: 0
    }
  }

  for (var i = 0; i < types.length; i++) {
    let type = types[i]
    if (type.regexp.test(value)) {
      return {
        type: type.name,
        value: parseFloat(value)
      }
    }
  }

  return {
    type: '',
    value: value
  }
}
Fallback option
If no suffix specified, assigning "px"