'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _assert = require('assert');

var _assert2 = _interopRequireDefault(_assert);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const getChannelName = function getChannelName({ method, exchange, queue }) {
  (0, _assert2.default)(method, 'method is required');
  (0, _assert2.default)(exchange || queue, 'exchange or queue is required');

  const p1 = method;
  const p2 = exchange || queue;

  return `${p1}.${p2}`;
};

exports.default = getChannelName;