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
// This code snippet requires jQuery to be loaded onto the page. | |
/** | |
* Wraps jQuery's ajax implementation inside an ES6 Promise structure. | |
* Source: https://stackoverflow.com/questions/35135110/jquery-ajax-with-es6-promises | |
* @function ajax | |
* @param {object} options - The config to pass to the ajax call. | |
* @return {object} - A Promise object to complete an ajax call. | |
*/ | |
function ajax(options) { |