const nReadlines = require('n-readlines'); const broadbandLines = new nReadlines('nums-to-test.txt'); let line; let lineNumber = 1; while (line = broadbandLines.next()) { if(/^#.*$/.test(line.toString())) { continue; } //console.log(`Line ${lineNumber} has: ${line.toString('utf-8')}`); lineNumber++; let fields = line.toString().split("\t"); console.log(fields[0]); console.log(fields[1]); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter