This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getJSON = async (url) => { | |
try { | |
const response = await fetch(url) | |
return await response.json() | |
} catch (error) { | |
throw new Error('Unable to get data: ', error) | |
} | |
} | |
export { getJSON as default } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ajaxFunction = function (object) { | |
var problemMessage = function (message) { | |
console.error(message); | |
}; | |
if (!Array.isArray(object) && typeof object == "object") { | |
object.method = object.method || "GET"; // Default Value for method | |
object.type = object.type || "text"; // Default Value for type | |
if(!object.url) { // Check URL | |
delete object.url; | |
problemMessage("'url:' is required in the ajaxFunction()."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Extra small devices (portrait phones, less than 576px) */ | |
/* Small devices (landscape phones, 576px and up) */ | |
@media (min-width: 576px) { | |
} | |
/* Medium devices (tablets, 768px and up) */ | |
@media (min-width: 768px) { |