{"action":"created","comment":{"url":"https://api.github.com/repos/trentm/node-tabula/pulls/comments/38013823","id":38013823,"diff_hunk":"@@ -126,10 +126,8 @@ function tabulaFormat(items, options) {\n     assert.optionalArrayOfString(options.sort, 'options.sort');\n     assert.optionalArrayOfString(options.validFields, 'options.validFields');\n     assert.optionalBool(options.dottedLookup, 'options.dottedLookup');\n+    assert.ok(options.columns || items[0], 'column names cannot be determined');\n \n-    if (items.length === 0) {\n-        return '';\n-    }\n     var cols = [];","path":"lib/tabula.js","position":9,"original_position":9,"commit_id":"2f7b82f25f1b8ce3e40d9e7445195919cff9e77d","original_commit_id":"2f7b82f25f1b8ce3e40d9e7445195919cff9e77d","user":{"login":"trentm","id":46866,"avatar_url":"https://avatars.githubusercontent.com/u/46866?v=3","gravatar_id":"","url":"https://api.github.com/users/trentm","html_url":"https://github.com/trentm","followers_url":"https://api.github.com/users/trentm/followers","following_url":"https://api.github.com/users/trentm/following{/other_user}","gists_url":"https://api.github.com/users/trentm/gists{/gist_id}","starred_url":"https://api.github.com/users/trentm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentm/subscriptions","organizations_url":"https://api.github.com/users/trentm/orgs","repos_url":"https://api.github.com/users/trentm/repos","events_url":"https://api.github.com/users/trentm/events{/privacy}","received_events_url":"https://api.github.com/users/trentm/received_events","type":"User","site_admin":false},"body":"doesn't this mean a current user upgrading could now be hitting an assert for some data case where they don't have any rows?  Hrm.   I wonder if some behaviour rather than assert here. Thoughts?","created_at":"2015-08-26T18:02:08Z","updated_at":"2015-08-26T18:02:08Z","html_url":"https://github.com/trentm/node-tabula/pull/2#discussion_r38013823","pull_request_url":"https://api.github.com/repos/trentm/node-tabula/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/trentm/node-tabula/pulls/comments/38013823"},"html":{"href":"https://github.com/trentm/node-tabula/pull/2#discussion_r38013823"},"pull_request":{"href":"https://api.github.com/repos/trentm/node-tabula/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/trentm/node-tabula/pulls/2","id":43431462,"html_url":"https://github.com/trentm/node-tabula/pull/2","diff_url":"https://github.com/trentm/node-tabula/pull/2.diff","patch_url":"https://github.com/trentm/node-tabula/pull/2.patch","issue_url":"https://api.github.com/repos/trentm/node-tabula/issues/2","number":2,"state":"open","locked":false,"title":"allow empty data with column headers","user":{"login":"bahamas10","id":1205722,"avatar_url":"https://avatars.githubusercontent.com/u/1205722?v=3","gravatar_id":"","url":"https://api.github.com/users/bahamas10","html_url":"https://github.com/bahamas10","followers_url":"https://api.github.com/users/bahamas10/followers","following_url":"https://api.github.com/users/bahamas10/following{/other_user}","gists_url":"https://api.github.com/users/bahamas10/gists{/gist_id}","starred_url":"https://api.github.com/users/bahamas10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahamas10/subscriptions","organizations_url":"https://api.github.com/users/bahamas10/orgs","repos_url":"https://api.github.com/users/bahamas10/repos","events_url":"https://api.github.com/users/bahamas10/events{/privacy}","received_events_url":"https://api.github.com/users/bahamas10/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-26T17:53:25Z","updated_at":"2015-08-26T18:02:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31444968b30bb73f49ce30daef5088e198d665b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/trentm/node-tabula/pulls/2/commits","review_comments_url":"https://api.github.com/repos/trentm/node-tabula/pulls/2/comments","review_comment_url":"https://api.github.com/repos/trentm/node-tabula/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trentm/node-tabula/issues/2/comments","statuses_url":"https://api.github.com/repos/trentm/node-tabula/statuses/2f7b82f25f1b8ce3e40d9e7445195919cff9e77d","head":{"label":"bahamas10:dave.eddy-1440611574","ref":"dave.eddy-1440611574","sha":"2f7b82f25f1b8ce3e40d9e7445195919cff9e77d","user":{"login":"bahamas10","id":1205722,"avatar_url":"https://avatars.githubusercontent.com/u/1205722?v=3","gravatar_id":"","url":"https://api.github.com/users/bahamas10","html_url":"https://github.com/bahamas10","followers_url":"https://api.github.com/users/bahamas10/followers","following_url":"https://api.github.com/users/bahamas10/following{/other_user}","gists_url":"https://api.github.com/users/bahamas10/gists{/gist_id}","starred_url":"https://api.github.com/users/bahamas10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahamas10/subscriptions","organizations_url":"https://api.github.com/users/bahamas10/orgs","repos_url":"https://api.github.com/users/bahamas10/repos","events_url":"https://api.github.com/users/bahamas10/events{/privacy}","received_events_url":"https://api.github.com/users/bahamas10/received_events","type":"User","site_admin":false},"repo":{"id":41381840,"name":"node-tabula","full_name":"bahamas10/node-tabula","owner":{"login":"bahamas10","id":1205722,"avatar_url":"https://avatars.githubusercontent.com/u/1205722?v=3","gravatar_id":"","url":"https://api.github.com/users/bahamas10","html_url":"https://github.com/bahamas10","followers_url":"https://api.github.com/users/bahamas10/followers","following_url":"https://api.github.com/users/bahamas10/following{/other_user}","gists_url":"https://api.github.com/users/bahamas10/gists{/gist_id}","starred_url":"https://api.github.com/users/bahamas10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahamas10/subscriptions","organizations_url":"https://api.github.com/users/bahamas10/orgs","repos_url":"https://api.github.com/users/bahamas10/repos","events_url":"https://api.github.com/users/bahamas10/events{/privacy}","received_events_url":"https://api.github.com/users/bahamas10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bahamas10/node-tabula","description":"a light function for printing a text table to stdout","fork":true,"url":"https://api.github.com/repos/bahamas10/node-tabula","forks_url":"https://api.github.com/repos/bahamas10/node-tabula/forks","keys_url":"https://api.github.com/repos/bahamas10/node-tabula/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bahamas10/node-tabula/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bahamas10/node-tabula/teams","hooks_url":"https://api.github.com/repos/bahamas10/node-tabula/hooks","issue_events_url":"https://api.github.com/repos/bahamas10/node-tabula/issues/events{/number}","events_url":"https://api.github.com/repos/bahamas10/node-tabula/events","assignees_url":"https://api.github.com/repos/bahamas10/node-tabula/assignees{/user}","branches_url":"https://api.github.com/repos/bahamas10/node-tabula/branches{/branch}","tags_url":"https://api.github.com/repos/bahamas10/node-tabula/tags","blobs_url":"https://api.github.com/repos/bahamas10/node-tabula/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bahamas10/node-tabula/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bahamas10/node-tabula/git/refs{/sha}","trees_url":"https://api.github.com/repos/bahamas10/node-tabula/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bahamas10/node-tabula/statuses/{sha}","languages_url":"https://api.github.com/repos/bahamas10/node-tabula/languages","stargazers_url":"https://api.github.com/repos/bahamas10/node-tabula/stargazers","contributors_url":"https://api.github.com/repos/bahamas10/node-tabula/contributors","subscribers_url":"https://api.github.com/repos/bahamas10/node-tabula/subscribers","subscription_url":"https://api.github.com/repos/bahamas10/node-tabula/subscription","commits_url":"https://api.github.com/repos/bahamas10/node-tabula/commits{/sha}","git_commits_url":"https://api.github.com/repos/bahamas10/node-tabula/git/commits{/sha}","comments_url":"https://api.github.com/repos/bahamas10/node-tabula/comments{/number}","issue_comment_url":"https://api.github.com/repos/bahamas10/node-tabula/issues/comments{/number}","contents_url":"https://api.github.com/repos/bahamas10/node-tabula/contents/{+path}","compare_url":"https://api.github.com/repos/bahamas10/node-tabula/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bahamas10/node-tabula/merges","archive_url":"https://api.github.com/repos/bahamas10/node-tabula/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bahamas10/node-tabula/downloads","issues_url":"https://api.github.com/repos/bahamas10/node-tabula/issues{/number}","pulls_url":"https://api.github.com/repos/bahamas10/node-tabula/pulls{/number}","milestones_url":"https://api.github.com/repos/bahamas10/node-tabula/milestones{/number}","notifications_url":"https://api.github.com/repos/bahamas10/node-tabula/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bahamas10/node-tabula/labels{/name}","releases_url":"https://api.github.com/repos/bahamas10/node-tabula/releases{/id}","created_at":"2015-08-25T18:51:43Z","updated_at":"2015-08-25T18:51:43Z","pushed_at":"2015-08-26T17:53:15Z","git_url":"git://github.com/bahamas10/node-tabula.git","ssh_url":"git@github.com:bahamas10/node-tabula.git","clone_url":"https://github.com/bahamas10/node-tabula.git","svn_url":"https://github.com/bahamas10/node-tabula","homepage":null,"size":119,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"trentm:master","ref":"master","sha":"decb9b4d110722565f7345a803636abc26898695","user":{"login":"trentm","id":46866,"avatar_url":"https://avatars.githubusercontent.com/u/46866?v=3","gravatar_id":"","url":"https://api.github.com/users/trentm","html_url":"https://github.com/trentm","followers_url":"https://api.github.com/users/trentm/followers","following_url":"https://api.github.com/users/trentm/following{/other_user}","gists_url":"https://api.github.com/users/trentm/gists{/gist_id}","starred_url":"https://api.github.com/users/trentm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentm/subscriptions","organizations_url":"https://api.github.com/users/trentm/orgs","repos_url":"https://api.github.com/users/trentm/repos","events_url":"https://api.github.com/users/trentm/events{/privacy}","received_events_url":"https://api.github.com/users/trentm/received_events","type":"User","site_admin":false},"repo":{"id":20340579,"name":"node-tabula","full_name":"trentm/node-tabula","owner":{"login":"trentm","id":46866,"avatar_url":"https://avatars.githubusercontent.com/u/46866?v=3","gravatar_id":"","url":"https://api.github.com/users/trentm","html_url":"https://github.com/trentm","followers_url":"https://api.github.com/users/trentm/followers","following_url":"https://api.github.com/users/trentm/following{/other_user}","gists_url":"https://api.github.com/users/trentm/gists{/gist_id}","starred_url":"https://api.github.com/users/trentm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentm/subscriptions","organizations_url":"https://api.github.com/users/trentm/orgs","repos_url":"https://api.github.com/users/trentm/repos","events_url":"https://api.github.com/users/trentm/events{/privacy}","received_events_url":"https://api.github.com/users/trentm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trentm/node-tabula","description":"a light function for printing a text table to stdout","fork":false,"url":"https://api.github.com/repos/trentm/node-tabula","forks_url":"https://api.github.com/repos/trentm/node-tabula/forks","keys_url":"https://api.github.com/repos/trentm/node-tabula/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trentm/node-tabula/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trentm/node-tabula/teams","hooks_url":"https://api.github.com/repos/trentm/node-tabula/hooks","issue_events_url":"https://api.github.com/repos/trentm/node-tabula/issues/events{/number}","events_url":"https://api.github.com/repos/trentm/node-tabula/events","assignees_url":"https://api.github.com/repos/trentm/node-tabula/assignees{/user}","branches_url":"https://api.github.com/repos/trentm/node-tabula/branches{/branch}","tags_url":"https://api.github.com/repos/trentm/node-tabula/tags","blobs_url":"https://api.github.com/repos/trentm/node-tabula/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trentm/node-tabula/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trentm/node-tabula/git/refs{/sha}","trees_url":"https://api.github.com/repos/trentm/node-tabula/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trentm/node-tabula/statuses/{sha}","languages_url":"https://api.github.com/repos/trentm/node-tabula/languages","stargazers_url":"https://api.github.com/repos/trentm/node-tabula/stargazers","contributors_url":"https://api.github.com/repos/trentm/node-tabula/contributors","subscribers_url":"https://api.github.com/repos/trentm/node-tabula/subscribers","subscription_url":"https://api.github.com/repos/trentm/node-tabula/subscription","commits_url":"https://api.github.com/repos/trentm/node-tabula/commits{/sha}","git_commits_url":"https://api.github.com/repos/trentm/node-tabula/git/commits{/sha}","comments_url":"https://api.github.com/repos/trentm/node-tabula/comments{/number}","issue_comment_url":"https://api.github.com/repos/trentm/node-tabula/issues/comments{/number}","contents_url":"https://api.github.com/repos/trentm/node-tabula/contents/{+path}","compare_url":"https://api.github.com/repos/trentm/node-tabula/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trentm/node-tabula/merges","archive_url":"https://api.github.com/repos/trentm/node-tabula/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trentm/node-tabula/downloads","issues_url":"https://api.github.com/repos/trentm/node-tabula/issues{/number}","pulls_url":"https://api.github.com/repos/trentm/node-tabula/pulls{/number}","milestones_url":"https://api.github.com/repos/trentm/node-tabula/milestones{/number}","notifications_url":"https://api.github.com/repos/trentm/node-tabula/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trentm/node-tabula/labels{/name}","releases_url":"https://api.github.com/repos/trentm/node-tabula/releases{/id}","created_at":"2014-05-30T19:50:30Z","updated_at":"2015-04-30T17:31:25Z","pushed_at":"2015-08-26T17:53:26Z","git_url":"git://github.com/trentm/node-tabula.git","ssh_url":"git@github.com:trentm/node-tabula.git","clone_url":"https://github.com/trentm/node-tabula.git","svn_url":"https://github.com/trentm/node-tabula","homepage":null,"size":320,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trentm/node-tabula/pulls/2"},"html":{"href":"https://github.com/trentm/node-tabula/pull/2"},"issue":{"href":"https://api.github.com/repos/trentm/node-tabula/issues/2"},"comments":{"href":"https://api.github.com/repos/trentm/node-tabula/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/trentm/node-tabula/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/trentm/node-tabula/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trentm/node-tabula/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/trentm/node-tabula/statuses/2f7b82f25f1b8ce3e40d9e7445195919cff9e77d"}}}}