MCPcopy Index your code
hub / github.com/tyroprogrammer/learn-react-app / getCompanyProfile

Method getCompanyProfile

src/api/DataApi.js:4–17  ·  view source on GitHub ↗
(company)

Source from the content-addressed store, hash-verified

2
3export default class DataApi {
4 static async getCompanyProfile(company) {
5 return new Promise((resolve, reject) => {
6 if (!company || company.trim().length !== 3) {
7 reject('Ticker cannot be empty and must be 3 character long');
8 }
9 try {
10 const result = CompanyDataGenerator.getCompanyProfile(company);
11 resolve(result);
12 } catch(e) {
13 console.error(e);
14 reject(e);
15 }
16 })
17 }
18
19 static async getCompanyFinancial(company) {
20 return new Promise((resolve, reject) => {

Callers 3

componentDidMountMethod · 0.45
fetchCompanyProfileMethod · 0.45
fetchCompanyProfileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected