function saveSpacingToLayer(spacing, layer) {
  log(2, 'Saving spacing to layer', layer, JSON.stringify(spacing))
  var name = layer.name().split('[')[0]

  if (!spacing) {
    layer.name = name
    return
  }

  if (name.slice(-1) != ' ')
    name += ' '

  layer.name = name + '[' + spacingToString(spacing) + ']'
}
Given a spacing object, save it to a layer in it's name
Preserving the layers current name