pointsight/libs/metaHandler.lib.js

26 lines
736 B
JavaScript
Raw Normal View History

2022-03-06 18:36:36 +01:00
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 }