-
-
Save mba811/ab21661c65b11ef738d5 to your computer and use it in GitHub Desktop.
Today Scripts:个性化 Yosemite 通知栏-Displaying Tabular Data
This file contains hidden or 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
| #!/usr/local/bin/node | |
| var Table = require('cli-table'); | |
| var table = new Table({ | |
| chars: { 'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': '' | |
| , 'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': '' | |
| , 'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': '' | |
| , 'right': '' , 'right-mid': '' , 'middle': ' ' }, | |
| style: { 'padding-left': 0, 'padding-right': 0 } | |
| }); | |
| table.push( | |
| { 'Some key': 'Some value' } | |
| , { 'Another key': 'Another value' } | |
| ); | |
| console.log(table.toString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment