mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add getStatusName helper
This commit is contained in:
parent
874e8738bd
commit
b725880da3
1 changed files with 14 additions and 1 deletions
|
|
@ -1,7 +1,20 @@
|
||||||
export default {
|
|
||||||
|
|
||||||
|
|
||||||
|
const statuses = {
|
||||||
'✅': 'native',
|
'✅': 'native',
|
||||||
'✳️': 'rosetta',
|
'✳️': 'rosetta',
|
||||||
'⏹': 'no-in-progress',
|
'⏹': 'no-in-progress',
|
||||||
'🚫': 'no',
|
'🚫': 'no',
|
||||||
'🔶': 'unreported',
|
'🔶': 'unreported',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getStatusName ( status ) {
|
||||||
|
for (const key in statuses) {
|
||||||
|
if (status.trim().startsWith( key )) return statuses[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error('Non status matched')
|
||||||
|
}
|
||||||
|
|
||||||
|
export default statuses
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue