function spacingFromString(string) {
  if (!string || string == '')
    return null

  var spacing = {}

  var values = string.split(' ')

  // Check if first value is 'spacing'
  var spacingLayout = values[0]

  var layout = spacingLayout.slice(-1)
  if (layout == 'v' || layout == 'h') {
    // Spacing exists
    var space = spacingLayout.substring(0, spacingLayout.length - 1)

    log(1, 'Layout', layout)
    log(1, 'Spacing', space)

    if (parseFloat(space).toString() != space) {
      log(2, 'Spacing is invalid', string)
      return null
    }

    spacing.layout = layout
    spacing.space = space

    values.shift() // Remove the first element
  }

  var alignments = []
  var invalidAlignment = false
  values.forEach(function(value) {
    var alignment = simplifyAlignment(value)
    if (alignment) {
      alignments.push(alignment)
    } else if (value) {
      invalidAlignment = true
      return
    }
  })

  if (invalidAlignment) {
    log(2, 'Alignments is invalid', string)
    return null
  }

  if (alignments.length > 0) {
    spacing.align = alignments
  }

  return spacing
}
Given a string e.g. 'vert 20'
Convert it to a spacing object