This file contains hidden or 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
| # Misc | |
| *.log | |
| npm-debug.* | |
| *.scssc | |
| *.swp | |
| .DS_Store | |
| Thumbs.db | |
| .sass-cache | |
| .env | |
| .cache |
This file contains hidden or 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
| /** | |
| * Escape double and single quotes inside a string | |
| * @param {String} string The string | |
| * @returns {String} The string with quotes escaped | |
| */ | |
| function escapeQuotes (string) { | |
| return string.replace(/"/g, """).replace(/'/g, "'"); | |
| } |
This file contains hidden or 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
| /** | |
| * Get the JSON data from a Response object. | |
| * @param {Response} response The Response object. | |
| * @returns {Promise} The JSON data or an Error. | |
| */ | |
| async function getJSON(response) { | |
| if (response.ok) { | |
| const data = await response.json(); | |
| return Promise.resolve(data); | |
| } |
NewerOlder