MCPcopy
hub / github.com/ThatGuySam/doesitarm / getAppType

Function getAppType

helpers/app-derived.js:18–41  ·  view source on GitHub ↗
( app )

Source from the content-addressed store, hash-verified

16}
17
18export function getAppType ( app ) {
19
20 // Videos don't have a category
21 // so we check for videos here
22 if ( isVideo( app ) ) {
23 return 'video'
24 }
25
26 if ( isDevice( app ) ) {
27 return 'device'
28 }
29
30 if(app.category !== Object(app.category)) {
31 console.warn('app has no categories', app)
32
33 return null
34 }
35
36 if (app.category.slug === 'homebrew') return 'formula'
37
38 if (app.category.slug === 'games') return 'game'
39
40 return 'app'
41}
42
43export function getAppEndpoint ( app ) {
44 // console.log('app', app)

Callers 6

buildMethod · 0.90
getRelatedVideosFunction · 0.90
constructorMethod · 0.90
getAppEndpointFunction · 0.85

Calls 2

isVideoFunction · 0.85
isDeviceFunction · 0.85

Tested by

no test coverage detected