More consitent use of mixins for interaactiong with thing descriptions
This commit is contained in:
parent
40b3d993ee
commit
1ba1a3082b
9 changed files with 45 additions and 29 deletions
|
|
@ -57,6 +57,13 @@ export const wotStoreModule = {
|
|||
thingAvailable: (state) => (thingName) => {
|
||||
return thingName in state.thingDescriptions;
|
||||
},
|
||||
thingAffordanceAvailable: (state) => (thing, affordanceType, affordance) => {
|
||||
let td = state.thingDescriptions[thing];
|
||||
if (!td) {
|
||||
return false;
|
||||
}
|
||||
return affordance in td[affordanceType];
|
||||
},
|
||||
thingFormUrl:
|
||||
(state) =>
|
||||
(thing, affordanceType, affordance, op, allowUndefined = true) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue