mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -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',
|
||||
'✳️': 'rosetta',
|
||||
'⏹': 'no-in-progress',
|
||||
'🚫': 'no',
|
||||
'🔶': '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