"client/src/git@gitlab.lam.fr:anis/anis-next.git" did not exist on "6273990bd6e493244d096b4bfb15f1f725930cce"
Newer
Older
/**
* Returns strict url address.
*
* @return string
*
* @example
* const url: string = getHost() + '/following-url/';
*/
export const getHost = (apiUrl: string): string => {
if (!apiUrl.startsWith('http')) {
return url.protocol + '//' + url.host + apiUrl;
/**
* Sorts objects by the display property.
*
* @param {number} a - The first object to sort.
* @param {number} b - The second object to sort.
*
* @example
* [objects].sortByDisplay()
*/
export const sortByDisplay = (a, b) => a.display - b.display;