function getSymbolSwapAction(layer, data) {
  return Actions.extractActions(String(layer.name()))
    .filter(swapAction => {
      return (
        swapAction.command === SwapSymbolAction.name ||
        swapAction.command === SwapSymbolAction.alias
      )
    })
    .map(swapAction => {
      return Actions.resolveAction(swapAction, data)
    })
    .filter(swapAction => {
      return swapAction.condition
    })[0]
}
Retrieves the symbol swap action if present.

@param {MSSymbolInstance} layer
@param {Object} data
@returns {Object}