Sha256: 75949f2cebe30616ca645b9c4033d387e505edf7416a013a90d973ef13d524c5
Contents?: true
Size: 723 Bytes
Versions: 26
Compression:
Stored size: 723 Bytes
Contents
#!/usr/bin/env node lines = []; process.stdin.setEncoding('utf8'); process.stdin.on('readable', function() { var input = process.stdin.read(); input = input + ''; input.split(/\n/).forEach(function (line) { if (line != 'null') { // fix lines.push(line); } }); ind = lines.map(function (l) { return l.match(/^\s*/)[0].length / 4 }) lines.forEach(function (l,i){ if (i == 0) { return } j = i - 1; while(j > -1){ if(ind[i] - ind[j] === 1){ console.log(' "'+lines[j].trim()+'" -> "'+lines[i].trim()+'"'); return } j--; } }); });
Version data entries
26 entries across 26 versions & 1 rubygems