WMS_MAIN/temp_find_trailing_commas.js
2026-04-17 19:21:57 +08:00

1 line
393 B
JavaScript

const fs=require('fs');const s=fs.readFileSync('methods/system.json','utf8');const re=/(,\s*\n\s*\])/g;let m;let found=false;while(m=re.exec(s)){found=true;const idx=m.index;const start=Math.max(0,idx-60);const end=Math.min(s.length,idx+60);console.log('---trailing comma before ] at',idx);console.log(s.slice(start,end));console.log('---');}if(!found) console.log('No ",\n]" patterns found');