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

Function Rcheck

Script/Parser.js:1171–1183  ·  view source on GitHub ↗
(content, param)

Source from the content-addressed store, hash-verified

1169
1170//Rewrite 筛选的函数
1171function Rcheck(content, param) {
1172 name = content.toUpperCase()
1173 if (param) {
1174 var flag = 0; //没命中
1175 const checkpara = (item) => name.indexOf(item.toUpperCase()) != -1;
1176 if (param.some(checkpara)) {
1177 flag = 1 //命中
1178 }
1179 return flag
1180 } else { //if param
1181 return 2
1182 } //无参数
1183}
1184
1185//分流规则转换及过滤(in&out),可用于 surge 及 quanx 的 rule-list
1186function Rule_Handle(subs, Pout, Pin) {

Callers 1

Rewrite_FilterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected