Inital commit
This commit is contained in:
commit
bedd69436b
175 files changed
+9965
No files matched your search
@@ -0,0 +1,10 @@
|
||||
function IsJsonString(str) {
|
||||
try {
|
||||
JSON.parse(str);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = { IsJsonString }
|
||||
@@ -0,0 +1,26 @@
|
||||
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 }
|
||||
Reference in new issue
Block a user