MCPcopy Create free account
hub / github.com/codemistic/Web-Development / getUser

Function getUser

GitHub_profiles/script.js:7–18  ·  view source on GitHub ↗
(username)

Source from the content-addressed store, hash-verified

5const search = document.getElementById('search')
6
7async function getUser(username) {
8 try {
9 const { data } = await axios(APIURL + username)
10
11 createUserCard(data)
12 getRepos(username)
13 } catch(err) {
14 if(err.response.status == 404) {
15 createErrorCard('No profile with this username')
16 }
17 }
18}
19
20async function getRepos(username) {
21 try {

Callers 1

script.jsFile · 0.70

Calls 3

createUserCardFunction · 0.70
getReposFunction · 0.70
createErrorCardFunction · 0.70

Tested by

no test coverage detected