/**
 * @param  {object} - `{ ?number, ?extension }`.
 * @return {string} Phone URI (RFC 3966).
 */
function formatRFC3966(_ref) {
  var number = _ref.number,
    ext = _ref.ext;
  if (!number) {
    return '';
  }
  if (number[0] !== '+') {
    throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
  }
  return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
}

export { formatRFC3966 };
//# sourceMappingURL=RFC3966.js.map
