MCPcopy Create free account
hub / github.com/cmliu/WorkerVless2sub / parseCSV

Function parseCSV

_worker.js:147–154  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

145
146 // CSV解析函数
147 function parseCSV(text) {
148 return text
149 .replace(/\r\n/g, '\n') // 统一Windows换行
150 .replace(/\r/g, '\n') // 处理老Mac换行
151 .split('\n') // 按Unix/Linux风格分割
152 .filter(line => line.trim() !== '') // 移除空行
153 .map(line => line.split(',').map(cell => cell.trim()));
154 }
155
156 // 并行处理CSV
157 const csvPromises = addressescsv.map(async (csvUrl) => {

Callers 1

整理测速结果Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected