WMS_MAIN/temp_find_objsep.js
2026-04-27 16:09:26 +08:00

2 lines
599 B
JavaScript

const fs = require('fs'); const s = fs.readFileSync('methods/system.json', 'utf8'); const re = /}\s*\n\s*{\s*"method"\s*:/g; let m; let found = false; while (m = re.exec(s)) { const idx = m.index; let j = idx - 1; while (j >= 0 && /\s/.test(s[j])) j--; const prev = s[j] || ''; if (prev !== ',') { found = true; const start = Math.max(0, idx - 80); const end = Math.min(s.length, idx + 80); console.log('---missing comma between objects at', idx, 'prevChar:', prev); console.log(s.slice(start, end)); console.log('---'); } } if (!found) console.log('No missing-comma-between-method-objects found');