function clearArtboard(layer) {
  // get original text
  let originalText = getOriginalText(layer)

  // check if there is original text stored for the layer
  if (originalText) {
    // set artboard name
    layer.setName(originalText)
  }

  // clear any data populator metadata
  removeLayerMetadata(layer)
}
Clears the artboard layer.

@param {MSArtboardGroup} layer