"use strict";

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

var _utils = require("./utils");

function CanarySorter(check) {
  return GetName(check).toLowerCase();
}

function GetName(check) {
  var title = check.name;

  if ((0, _utils.isEmpty)(title)) {
    title = check.description;
  }

  if ((0, _utils.isEmpty)(title)) {
    title = check.endpoint;
  }

  return title || "";
}