26 lines
736 B
JavaScript
26 lines
736 B
JavaScript
function returnTags(module){
|
|
const meta = module.getModuleMeta()
|
|
if(meta.features != undefined){
|
|
if(meta.features.includes("tags")){
|
|
return(meta.tags)
|
|
}
|
|
}else if(meta.tags != undefined){
|
|
return(meta.tags)
|
|
}else{
|
|
return([]) // Assume the module does not support tags
|
|
}
|
|
}
|
|
|
|
function returnCountries(module){
|
|
const meta = module.getModuleMeta()
|
|
if(meta.features != undefined){
|
|
if(meta.features.includes("countries")){
|
|
return(meta.country)
|
|
}
|
|
}if(meta.country != undefined){
|
|
return(meta.country)
|
|
}else{
|
|
return(["*"]) // Assume the module does not support tags
|
|
}
|
|
}
|
|
module.exports = { returnTags, returnCountries } |