-
-
Save qls0ulp/18eea6db21d43386bafdb44d8ddd8758 to your computer and use it in GitHub Desktop.
Revisions
-
domenic revised this gist
Nov 11, 2015 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ function getUserDetail(username) { if (userCache[username]) { return Promise.resolve(userCache[username]); } // Use the fetch API to get the information return fetch('users/' + username + '.json') .then(function(result) { userCache[username] = result; return result; }) .catch(function() { throw new Error('Could not find user: ' + username); }); } -
domenic revised this gist
Nov 11, 2015 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ function getUserDetail(username) { if (userCache[username]) { return Promise.resolve(userCache[username]); } // Use the fetch API to get the information return fetch('users/' + username + '.json') .then(function(result) { userCache[username] = result; reutrn result; }) .catch(function() { throw new Error('Could not find user: ' + username); }); } -
domenic created this gist
Nov 11, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ function getUserDetail(username) { if (userCache[username]) { return Promise.resolve(userCache[username]); } // Use the fetch API to get the information return fetch('users/' + username + '.json') .then(function(result) { userCache[username] = result; reutrn result; }) .catch(function() { throw new Error('Could not find user: ' + username); }); }