function performActions(layer, data) {
  // process conditional actions on the layer
  let actions = extractActions(layer.name())

  // perform actions
  actions.forEach(action => {
    performAction(action, layer, data)
  })
}
Perform all actions on a layer.

@param {MSLayer} layer
@param {Object} data