Created
June 24, 2022 21:43
-
-
Save pushkar100/b839a625a2dd47ffa8146ee9bd46aab6 to your computer and use it in GitHub Desktop.
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
/* /src/helpers/index.js */ | |
// ... | |
const fetchFakeAPIData = (request) => new Promise((resolve, reject) => { | |
if (request.animal) { | |
resolve({ | |
animal: 'Dog', | |
name: 'Charlie' | |
}); | |
} | |
reject({ | |
error: 'Did not find species' | |
}) | |
}); | |
export { isEarlierThanNow, fetchFakeAPIData }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment