MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / formatCronexp

Function formatCronexp

Rewrite-Parser.beta.js:2296–2303  ·  view source on GitHub ↗
(value, targetApp)

Source from the content-addressed store, hash-verified

2294}
2295
2296function formatCronexp(value, targetApp) {
2297 if (!value) return value
2298 value = normalizeTemplateValue(value, targetApp)
2299 if ((targetApp == 'surge-module' || targetApp == 'shadowrocket-module') && /\{\{\{[^{}]+\}\}\}/.test(value)) {
2300 return `"${value}"`
2301 }
2302 return /,/.test(value) ? `"${value}"` : value
2303}
2304
2305function getSurgeRuleTogglePrefix(value) {
2306 if (!value) return ''

Callers 1

Calls 1

normalizeTemplateValueFunction · 0.85

Tested by

no test coverage detected