renamed function

This commit is contained in:
2022-06-06 14:48:58 -05:00
parent 7e7f8bc892
commit cf4043ee2a

View File

@@ -11,7 +11,7 @@ const BaseUrl = `https://git.zomo.dev/zomo/browser-scripts/`
const FileUrl = name =>
`https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/${name}.zomo.js`
function ValueNotEmpty(val) {
function isValueNotEmpty(val) {
return (
val !== '' &&
val !== false &&
@@ -50,7 +50,7 @@ function MetadataArgs(name) {
readFileSync(`scripts/${name}/meta.json`).toString()
)
for (let key in meta) {
if (ValueNotEmpty(args[key])) {
if (isValueNotEmpty(args[key])) {
meta[key] = args[key]
}
}
@@ -68,7 +68,7 @@ function MetadataArgs(name) {
return `// ==UserScript==
${Object.keys(meta)
.filter(key => ValueNotEmpty(meta[key]))
.filter(key => isValueNotEmpty(meta[key]))
.map(key => {
let val = meta[key],
key_str = padr(key in keyConversion ? keyConversion[key] : key, 12)