/** * The message that is displayed when the application fails to connect to the API. */ export const couldNotConnectMessage: string = "Could not to connect to API. Is the URL correct? Are you using a script blocker? " + "See the About section for more information."; // TODO: Add a merge strategy (to prefer HTTPS) /** * Merges the given maps into a new map containing all their elements. * * @param maps the maps to merge into a single map * @return the combined map */ export const mergeMaps = (maps: Map[]): Map => { return maps.reduce((combined, map) => new Map([...combined, ...map]), new Map()); } /** * Merges the given sets into a new set containing all their elements. * * @param sets the sets to merge into a single set * @return the combined set */ export const mergeSets = (sets: Set[]): Set => { return sets.reduce((combined, set) => new Set([...combined, ...set]), new Set()); }