forked from rmurphey/js-assessment
-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathasync.js
26 lines (23 loc) · 853 Bytes
/
async.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
asyncAnswers = {
/**
* Asynchronously returns a value via a promise. Example:
* async('anyValue').then((result) => { return result === 'anyValue';});
*
* @param value - Any value
* @returns {then: function} A promise like object containing a then property.
*/
async: function async(value) {
},
/**
* Creates a promise that resolves with the data returned from an ajax call to the url url.
* You may use jquery, XMLHttpRequest, or fetch.
* https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
* https://api.jquery.com/jQuery.ajax/
* https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API *
*
* @param {String} url - a valid url
* @returns {then: function} A promise like object containing a then property.
*/
manipulateRemoteData: function manipulateRemoteData(url) {
},
};