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

Function QXSort

Script/Parser.js:2158–2171  ·  view source on GitHub ↗
(content, para)

Source from the content-addressed store, hash-verified

2156
2157//根据节点名排序(不含emoji 部分)
2158function QXSort(content, para) {
2159 var nlist = content;//.split("\n");
2160 if (para == 1) {
2161 return nlist.sort(ToTag)
2162 } else if (para == -1) {
2163 return nlist.sort(ToTagR)
2164 } else if(para == "x") {
2165 return shuffle(nlist)
2166 } else if(para == "0") {
2167 return nlist
2168 } else {
2169 return Sort_KWD (nlist,para) //关键词排序
2170 }
2171}
2172//正序
2173function ToTag(elem1, elem2) {
2174 var tag1 = elem1.split("tag")[1].split("=")[1].trim()

Callers 1

ResourceParseFunction · 0.85

Calls 2

shuffleFunction · 0.85
Sort_KWDFunction · 0.85

Tested by

no test coverage detected