Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

document vertical tables

  • Loading branch information...
commit 55086c2689b42aa650270846d37fa1d9aa093073 1 parent 8dbe66d
@sonnym sonnym authored
Showing with 15 additions and 2 deletions.
  1. +15 −2 README.md
View
17 README.md
@@ -25,6 +25,7 @@ npm install cli-table
## How to use
+### Horizontal Tables
```javascript
var Table = require('cli-table');
@@ -40,7 +41,19 @@ table.push(
, ['First value', 'Second value']
);
-// render
+console.log(table.toString());
+```
+
+### Vertical Tables
+```javascript
+var Table = require('cli-table');
+var table = new Table();
+
+table.push(
+ { 'Some key': 'Some value' }
+ , { 'Another key': 'Another value' }
+);
+
console.log(table.toString());
```
@@ -79,4 +92,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please sign in to comment.
Something went wrong with that request. Please try again.