(str, options)
| 297 | }; |
| 298 | |
| 299 | const parseStringSync = (str, options) => { |
| 300 | const results = []; |
| 301 | const lines = str.split('\n'); |
| 302 | |
| 303 | for (let i = 0; i < lines.length; ++i) { |
| 304 | const line = lines[i].trim(); |
| 305 | if (line.length === 0) { |
| 306 | continue; |
| 307 | } |
| 308 | const result = parseLine(line, options); |
| 309 | results.push(result); |
| 310 | } |
| 311 | |
| 312 | return results; |
| 313 | }; |
| 314 | |
| 315 | const parseFileSync = (file, options) => { |
| 316 | return parseStringSync(fs.readFileSync(file, 'utf8'), options); |
no outgoing calls
no test coverage detected