Skip to content

Commit

Permalink
Fixing formatting, version bump 0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sorensen committed Feb 6, 2015
1 parent 2ca6f28 commit d6c1df0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
45 changes: 22 additions & 23 deletions ascii-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function AsciiTable(name, options) {
* Current library version, should match `package.json`
*/

AsciiTable.VERSION = '0.0.6'
AsciiTable.VERSION = '0.0.7'

/*!
* Alignment constants
Expand Down Expand Up @@ -404,30 +404,29 @@ AsciiTable.prototype.addRowMatrix = function(rows) {
return this
}

/**
* Add rows from the given data array, processed by the callback function rowCallback.
*
* @param {Array} data
* @param (Function) rowCallback
* @param (Boolean) asMatrix - controls if the row created by rowCallback should be assigned as row matrix
* @api public
*/

AsciiTable.prototype.addData = function(data, rowCallback, asMatrix) {
if(Object.prototype.toString.call( data ) !== '[object Array]') {

return this;
}
for (var index = 0, limit = data.length; index < limit; index++) {
var row = rowCallback(data[index]);
if(asMatrix) {
this.addRowMatrix(row);
} else {
this.addRow(row);
}
/**
* Add rows from the given data array, processed by the callback function rowCallback.
*
* @param {Array} data
* @param (Function) rowCallback
* @param (Boolean) asMatrix - controls if the row created by rowCallback should be assigned as row matrix
* @api public
*/

AsciiTable.prototype.addData = function(data, rowCallback, asMatrix) {
if (toString.call(data) !== '[object Array]') {
return this;
}
for (var index = 0, limit = data.length; index < limit; index++) {
var row = rowCallback(data[index]);
if(asMatrix) {
this.addRowMatrix(row);
} else {
this.addRow(row);
}
return this
}
return this
}

/**
* Reset the current row state
Expand Down
2 changes: 1 addition & 1 deletion ascii-table.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ascii-table",
"main": "ascii-table.js",
"version": "0.0.6",
"version": "0.0.7",
"homepage": "https://github.com/sorensen/ascii-table",
"authors": [
"Beau Sorensen <mail@beausorensen.com>"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ascii-table"
, "version": "0.0.6"
, "version": "0.0.7"
, "license": "MIT"
, "keywords": [
"table"
Expand Down

0 comments on commit d6c1df0

Please sign in to comment.