MCPcopy Create free account
hub / github.com/Moli-X/Resources / isSurge

Function isSurge

Script/Parser.js:2579–2586  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

2577
2578// 用于过滤非节点部分(比如整份配置中其它内容)
2579function isSurge(content) {
2580 if (content.indexOf("=") != -1) {
2581 cnt = content.split("=")[1].split(",")[0].trim()
2582 if (cnt == "http" || cnt == "ss" || cnt == "trojan" || cnt == "vmess" || cnt == "custom" || cnt == "https" || cnt == "socks5"|| cnt == "socks5-tls") {
2583 return content
2584 }
2585 }
2586}
2587// 用于参数检查
2588function paraCheck(content, para) {
2589 content=content.replace(/ /g,"")

Callers 2

initFunction · 0.85
initFunction · 0.85

Calls 1

indexOfMethod · 0.45

Tested by

no test coverage detected