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

Version Path
ix-cli-0.0.27 bin/ix-indent-to-dot
ix-cli-0.0.26 bin/ix-indent-to-dot
ix-cli-0.0.25 bin/ix-indent-to-dot
ix-cli-0.0.24 bin/ix-indent-to-dot
ix-cli-0.0.23 bin/ix-indent-to-dot
ix-cli-0.0.22 bin/ix-indent-to-dot
ix-cli-0.0.21 bin/ix-indent-to-dot
ix-cli-0.0.20 bin/ix-indent-to-dot
ix-cli-0.0.19 bin/ix-indent-to-dot
ix-cli-0.0.18 bin/ix-indent-to-dot
ix-cli-0.0.17 bin/ix-indent-to-dot
ix-cli-0.0.16 bin/ix-indent-to-dot
ix-cli-0.0.15 bin/ix-indent-to-dot
ix-cli-0.0.14 bin/ix-indent-to-dot
ix-cli-0.0.13 bin/ix-indent-to-dot
ix-cli-0.0.12 bin/ix-indent-to-dot
ix-cli-0.0.11 bin/ix-indent-to-dot
ix-cli-0.0.10 bin/ix-indent-to-dot
ix-cli-0.0.9 bin/ix-indent-to-dot
ix-cli-0.0.7 bin/ix-indent-to-dot