Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dave Pacheco
committed
Jul 18, 2012
1 parent
23acc2f
commit c6cbf1e
Showing
3 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
var mod_tab = require('../lib/tab'); | ||
|
||
mod_tab.emitTable({ | ||
'columns': [ { | ||
'label': 'PID', | ||
'align': 'right', | ||
'width': 6 | ||
}, { | ||
'label': 'TTY', | ||
'width': 7 | ||
}, { | ||
'label': 'TIME', | ||
'align': 'right', | ||
'width': 10 | ||
}, { | ||
'label': 'CMD' | ||
} ], | ||
|
||
'rows': [ { | ||
'PID': '60881', | ||
'TTY': 'ttys000', | ||
'TIME': '0:00.19', | ||
'CMD': '-bash' | ||
}, { | ||
'PID': '61674', | ||
'TTY': 'ttys000', | ||
'TIME': '0:00.17', | ||
'CMD': 'vim README.md' | ||
} ] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var mod_tab = require('../lib/tab'); | ||
|
||
var out = new mod_tab.TableOutputStream({ | ||
'columns': [ 'PID', 'TTY', 'TIME', 'CMD' ] | ||
}); | ||
|
||
out.writeRow([ '60881', 'ttys000', '0:00.19', '-bash' ]); | ||
out.writeRow({ | ||
'PID': '61674', | ||
'TTY': 'ttys000', | ||
'TIME': '0:00.17', | ||
'CMD': 'vim README.md' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters