mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Add library to manage async resource Make Store reusable for easier testing Move plugin to libs Add getTaskFor getter with tests
6 lines
213 B
JavaScript
6 lines
213 B
JavaScript
// Return all the tags belonging to an user task
|
|
export function getTagsFor (store) {
|
|
return (task) => store.state.user.data.tags
|
|
.filter(tag => task.tags.indexOf(tag.id) !== -1)
|
|
.map(tag => tag.name);
|
|
} |