{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/sparkly/pulls/comments/46654824","id":46654824,"diff_hunk":"@@ -1,15 +1,27 @@\n 'use strict';\n var isFinite = require('is-finite');\n \n-module.exports = function (numbers) {\n+module.exports = function (numbers, range) {\n \tif (!Array.isArray(numbers)) {\n \t\tthrow new TypeError('Expected an array');\n \t}\n \n \tvar ticks = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];\n \tvar finiteNumbers = numbers.filter(isFinite);\n-\tvar min = Math.min.apply(null, finiteNumbers);\n-\tvar max = Math.max.apply(null, finiteNumbers);\n+\tvar min;\n+\tvar max;\n+\n+\tif (range && range.min) {","path":"index.js","position":17,"original_position":17,"commit_id":"c84397543e6ffdcb04fc86178ee221715863948e","original_commit_id":"c84397543e6ffdcb04fc86178ee221715863948e","user":{"login":"SamVerschueren","id":1913805,"avatar_url":"https://avatars.githubusercontent.com/u/1913805?v=3","gravatar_id":"","url":"https://api.github.com/users/SamVerschueren","html_url":"https://github.com/SamVerschueren","followers_url":"https://api.github.com/users/SamVerschueren/followers","following_url":"https://api.github.com/users/SamVerschueren/following{/other_user}","gists_url":"https://api.github.com/users/SamVerschueren/gists{/gist_id}","starred_url":"https://api.github.com/users/SamVerschueren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamVerschueren/subscriptions","organizations_url":"https://api.github.com/users/SamVerschueren/orgs","repos_url":"https://api.github.com/users/SamVerschueren/repos","events_url":"https://api.github.com/users/SamVerschueren/events{/privacy}","received_events_url":"https://api.github.com/users/SamVerschueren/received_events","type":"User","site_admin":false},"body":"I would go for `opts = opts || {}` in the beginning so you don't have to check every time.","created_at":"2015-12-04T07:14:55Z","updated_at":"2015-12-04T07:14:55Z","html_url":"https://github.com/sindresorhus/sparkly/pull/4#discussion_r46654824","pull_request_url":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/sparkly/pulls/comments/46654824"},"html":{"href":"https://github.com/sindresorhus/sparkly/pull/4#discussion_r46654824"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4","id":51934046,"html_url":"https://github.com/sindresorhus/sparkly/pull/4","diff_url":"https://github.com/sindresorhus/sparkly/pull/4.diff","patch_url":"https://github.com/sindresorhus/sparkly/pull/4.patch","issue_url":"https://api.github.com/repos/sindresorhus/sparkly/issues/4","number":4,"state":"open","locked":false,"title":"adds support for min-max","user":{"login":"distinctblur","id":7071247,"avatar_url":"https://avatars.githubusercontent.com/u/7071247?v=3","gravatar_id":"","url":"https://api.github.com/users/distinctblur","html_url":"https://github.com/distinctblur","followers_url":"https://api.github.com/users/distinctblur/followers","following_url":"https://api.github.com/users/distinctblur/following{/other_user}","gists_url":"https://api.github.com/users/distinctblur/gists{/gist_id}","starred_url":"https://api.github.com/users/distinctblur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distinctblur/subscriptions","organizations_url":"https://api.github.com/users/distinctblur/orgs","repos_url":"https://api.github.com/users/distinctblur/repos","events_url":"https://api.github.com/users/distinctblur/events{/privacy}","received_events_url":"https://api.github.com/users/distinctblur/received_events","type":"User","site_admin":false},"body":"Giving a go at #3 \r\n\r\nThis is my first PR that isn't just a spelling correction or addition to a README. Feedback and criticism appreciated! ","created_at":"2015-11-26T17:08:15Z","updated_at":"2015-12-04T07:14:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bce5dc0c07a32497f6ab3a7f76071ee13965f936","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/sparkly/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/sparkly/issues/4/comments","statuses_url":"https://api.github.com/repos/sindresorhus/sparkly/statuses/c84397543e6ffdcb04fc86178ee221715863948e","head":{"label":"distinctblur:minmax","ref":"minmax","sha":"c84397543e6ffdcb04fc86178ee221715863948e","user":{"login":"distinctblur","id":7071247,"avatar_url":"https://avatars.githubusercontent.com/u/7071247?v=3","gravatar_id":"","url":"https://api.github.com/users/distinctblur","html_url":"https://github.com/distinctblur","followers_url":"https://api.github.com/users/distinctblur/followers","following_url":"https://api.github.com/users/distinctblur/following{/other_user}","gists_url":"https://api.github.com/users/distinctblur/gists{/gist_id}","starred_url":"https://api.github.com/users/distinctblur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distinctblur/subscriptions","organizations_url":"https://api.github.com/users/distinctblur/orgs","repos_url":"https://api.github.com/users/distinctblur/repos","events_url":"https://api.github.com/users/distinctblur/events{/privacy}","received_events_url":"https://api.github.com/users/distinctblur/received_events","type":"User","site_admin":false},"repo":{"id":46934019,"name":"sparkly","full_name":"distinctblur/sparkly","owner":{"login":"distinctblur","id":7071247,"avatar_url":"https://avatars.githubusercontent.com/u/7071247?v=3","gravatar_id":"","url":"https://api.github.com/users/distinctblur","html_url":"https://github.com/distinctblur","followers_url":"https://api.github.com/users/distinctblur/followers","following_url":"https://api.github.com/users/distinctblur/following{/other_user}","gists_url":"https://api.github.com/users/distinctblur/gists{/gist_id}","starred_url":"https://api.github.com/users/distinctblur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distinctblur/subscriptions","organizations_url":"https://api.github.com/users/distinctblur/orgs","repos_url":"https://api.github.com/users/distinctblur/repos","events_url":"https://api.github.com/users/distinctblur/events{/privacy}","received_events_url":"https://api.github.com/users/distinctblur/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/distinctblur/sparkly","description":"Generate sparklines ▁▂▃▅▂▇","fork":true,"url":"https://api.github.com/repos/distinctblur/sparkly","forks_url":"https://api.github.com/repos/distinctblur/sparkly/forks","keys_url":"https://api.github.com/repos/distinctblur/sparkly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/distinctblur/sparkly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/distinctblur/sparkly/teams","hooks_url":"https://api.github.com/repos/distinctblur/sparkly/hooks","issue_events_url":"https://api.github.com/repos/distinctblur/sparkly/issues/events{/number}","events_url":"https://api.github.com/repos/distinctblur/sparkly/events","assignees_url":"https://api.github.com/repos/distinctblur/sparkly/assignees{/user}","branches_url":"https://api.github.com/repos/distinctblur/sparkly/branches{/branch}","tags_url":"https://api.github.com/repos/distinctblur/sparkly/tags","blobs_url":"https://api.github.com/repos/distinctblur/sparkly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/distinctblur/sparkly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/distinctblur/sparkly/git/refs{/sha}","trees_url":"https://api.github.com/repos/distinctblur/sparkly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/distinctblur/sparkly/statuses/{sha}","languages_url":"https://api.github.com/repos/distinctblur/sparkly/languages","stargazers_url":"https://api.github.com/repos/distinctblur/sparkly/stargazers","contributors_url":"https://api.github.com/repos/distinctblur/sparkly/contributors","subscribers_url":"https://api.github.com/repos/distinctblur/sparkly/subscribers","subscription_url":"https://api.github.com/repos/distinctblur/sparkly/subscription","commits_url":"https://api.github.com/repos/distinctblur/sparkly/commits{/sha}","git_commits_url":"https://api.github.com/repos/distinctblur/sparkly/git/commits{/sha}","comments_url":"https://api.github.com/repos/distinctblur/sparkly/comments{/number}","issue_comment_url":"https://api.github.com/repos/distinctblur/sparkly/issues/comments{/number}","contents_url":"https://api.github.com/repos/distinctblur/sparkly/contents/{+path}","compare_url":"https://api.github.com/repos/distinctblur/sparkly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/distinctblur/sparkly/merges","archive_url":"https://api.github.com/repos/distinctblur/sparkly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/distinctblur/sparkly/downloads","issues_url":"https://api.github.com/repos/distinctblur/sparkly/issues{/number}","pulls_url":"https://api.github.com/repos/distinctblur/sparkly/pulls{/number}","milestones_url":"https://api.github.com/repos/distinctblur/sparkly/milestones{/number}","notifications_url":"https://api.github.com/repos/distinctblur/sparkly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/distinctblur/sparkly/labels{/name}","releases_url":"https://api.github.com/repos/distinctblur/sparkly/releases{/id}","created_at":"2015-11-26T15:23:35Z","updated_at":"2015-11-26T15:23:36Z","pushed_at":"2015-11-26T17:04:17Z","git_url":"git://github.com/distinctblur/sparkly.git","ssh_url":"git@github.com:distinctblur/sparkly.git","clone_url":"https://github.com/distinctblur/sparkly.git","svn_url":"https://github.com/distinctblur/sparkly","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"sindresorhus:master","ref":"master","sha":"67a6bc8426d46af442fcd9f069dcc93fbfeab94a","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":23405998,"name":"sparkly","full_name":"sindresorhus/sparkly","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/sparkly","description":"Generate sparklines ▁▂▃▅▂▇","fork":false,"url":"https://api.github.com/repos/sindresorhus/sparkly","forks_url":"https://api.github.com/repos/sindresorhus/sparkly/forks","keys_url":"https://api.github.com/repos/sindresorhus/sparkly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/sparkly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/sparkly/teams","hooks_url":"https://api.github.com/repos/sindresorhus/sparkly/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/sparkly/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/sparkly/events","assignees_url":"https://api.github.com/repos/sindresorhus/sparkly/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/sparkly/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/sparkly/tags","blobs_url":"https://api.github.com/repos/sindresorhus/sparkly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/sparkly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/sparkly/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/sparkly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/sparkly/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/sparkly/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/sparkly/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/sparkly/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/sparkly/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/sparkly/subscription","commits_url":"https://api.github.com/repos/sindresorhus/sparkly/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/sparkly/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/sparkly/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/sparkly/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/sparkly/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/sparkly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/sparkly/merges","archive_url":"https://api.github.com/repos/sindresorhus/sparkly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/sparkly/downloads","issues_url":"https://api.github.com/repos/sindresorhus/sparkly/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/sparkly/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/sparkly/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/sparkly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/sparkly/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/sparkly/releases{/id}","created_at":"2014-08-27T21:25:19Z","updated_at":"2015-12-03T20:39:47Z","pushed_at":"2015-11-26T17:08:16Z","git_url":"git://github.com/sindresorhus/sparkly.git","ssh_url":"git@github.com:sindresorhus/sparkly.git","clone_url":"https://github.com/sindresorhus/sparkly.git","svn_url":"https://github.com/sindresorhus/sparkly","homepage":null,"size":196,"stargazers_count":145,"watchers_count":145,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4"},"html":{"href":"https://github.com/sindresorhus/sparkly/pull/4"},"issue":{"href":"https://api.github.com/repos/sindresorhus/sparkly/issues/4"},"comments":{"href":"https://api.github.com/repos/sindresorhus/sparkly/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/sparkly/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/sparkly/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/sparkly/statuses/c84397543e6ffdcb04fc86178ee221715863948e"}}}}