MCPcopy Index your code
hub / github.com/ccxt/ccxt / getData

Function getData

postinstall.js:47–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45]
46
47async function getData () {
48 const [collectiveData_result, githubData_result] = await Promise.all ([fetch ('https://opencollective.com/ccxt.json'), fetch ('https://api.github.com/repos/ccxt/ccxt')])
49 const collectiveData = await collectiveData_result.json()
50 const githubData = await githubData_result.json()
51
52 return {
53 contributors: collectiveData['contributorsCount'].toLocaleString (),
54 backers: collectiveData['backersCount'].toLocaleString (),
55 balance: Math.floor (collectiveData['balance'] / 100).toLocaleString (),
56 budget: Math.floor (collectiveData['yearlyIncome'] / 100).toLocaleString (),
57 stars: githubData['stargazers_count'].toLocaleString (),
58 forks: githubData['forks_count'].toLocaleString (),
59 size: (githubData['size'] / 1000000).toFixed (2)
60 }
61}
62
63function pad (string) {
64 const padding = 80 - string.length

Callers 1

mainFunction · 0.85

Calls 4

fetchFunction · 0.50
jsonMethod · 0.45
floorMethod · 0.45
toFixedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…