{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/filled-array/pulls/comments/44121715","id":44121715,"diff_hunk":"@@ -1,13 +1,14 @@\n 'use strict';\n-module.exports = function (str, n) {\n+module.exports = function (item, n) {\n \tvar ret = new Array(n);\n+\tvar isCb = typeof item === 'function';","path":"index.js","position":5,"original_position":5,"commit_id":"331476a9dfbef1b85e4fd1858d1484bfb37f2610","original_commit_id":"331476a9dfbef1b85e4fd1858d1484bfb37f2610","user":{"login":"kevva","id":709159,"avatar_url":"https://avatars.githubusercontent.com/u/709159?v=3","gravatar_id":"","url":"https://api.github.com/users/kevva","html_url":"https://github.com/kevva","followers_url":"https://api.github.com/users/kevva/followers","following_url":"https://api.github.com/users/kevva/following{/other_user}","gists_url":"https://api.github.com/users/kevva/gists{/gist_id}","starred_url":"https://api.github.com/users/kevva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevva/subscriptions","organizations_url":"https://api.github.com/users/kevva/orgs","repos_url":"https://api.github.com/users/kevva/repos","events_url":"https://api.github.com/users/kevva/events{/privacy}","received_events_url":"https://api.github.com/users/kevva/received_events","type":"User","site_admin":false},"body":"`isFn` is a better name imo.","created_at":"2015-11-06T10:14:15Z","updated_at":"2015-11-06T10:14:15Z","html_url":"https://github.com/sindresorhus/filled-array/pull/3#discussion_r44121715","pull_request_url":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/filled-array/pulls/comments/44121715"},"html":{"href":"https://github.com/sindresorhus/filled-array/pull/3#discussion_r44121715"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3","id":49830811,"html_url":"https://github.com/sindresorhus/filled-array/pull/3","diff_url":"https://github.com/sindresorhus/filled-array/pull/3.diff","patch_url":"https://github.com/sindresorhus/filled-array/pull/3.patch","issue_url":"https://api.github.com/repos/sindresorhus/filled-array/issues/3","number":3,"state":"open","locked":false,"title":"Allow for passing in function to generate array items","user":{"login":"Maximilianos","id":2260302,"avatar_url":"https://avatars.githubusercontent.com/u/2260302?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximilianos","html_url":"https://github.com/Maximilianos","followers_url":"https://api.github.com/users/Maximilianos/followers","following_url":"https://api.github.com/users/Maximilianos/following{/other_user}","gists_url":"https://api.github.com/users/Maximilianos/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximilianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximilianos/subscriptions","organizations_url":"https://api.github.com/users/Maximilianos/orgs","repos_url":"https://api.github.com/users/Maximilianos/repos","events_url":"https://api.github.com/users/Maximilianos/events{/privacy}","received_events_url":"https://api.github.com/users/Maximilianos/received_events","type":"User","site_admin":false},"body":"Slightly better way of doing something like:\r\n```javascript\r\nfilledArray(index => index * 10, 5) // = [0, 10, 20, 30, 40, 50]\r\n// vs.\r\nfilledArray(0, 5).map((_, index) => index * 10) // = [0, 10, 20, 30, 40, 50]\r\n```\r\nor\r\n```javascript\r\nfilledArray(() => Math.random(), 10000);\r\n```","created_at":"2015-11-05T14:34:17Z","updated_at":"2015-11-06T10:14:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c26bd0045904c5107970aeab361bfac287b89fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/filled-array/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/filled-array/issues/3/comments","statuses_url":"https://api.github.com/repos/sindresorhus/filled-array/statuses/331476a9dfbef1b85e4fd1858d1484bfb37f2610","head":{"label":"Maximilianos:patch-1","ref":"patch-1","sha":"331476a9dfbef1b85e4fd1858d1484bfb37f2610","user":{"login":"Maximilianos","id":2260302,"avatar_url":"https://avatars.githubusercontent.com/u/2260302?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximilianos","html_url":"https://github.com/Maximilianos","followers_url":"https://api.github.com/users/Maximilianos/followers","following_url":"https://api.github.com/users/Maximilianos/following{/other_user}","gists_url":"https://api.github.com/users/Maximilianos/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximilianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximilianos/subscriptions","organizations_url":"https://api.github.com/users/Maximilianos/orgs","repos_url":"https://api.github.com/users/Maximilianos/repos","events_url":"https://api.github.com/users/Maximilianos/events{/privacy}","received_events_url":"https://api.github.com/users/Maximilianos/received_events","type":"User","site_admin":false},"repo":{"id":45615639,"name":"filled-array","full_name":"Maximilianos/filled-array","owner":{"login":"Maximilianos","id":2260302,"avatar_url":"https://avatars.githubusercontent.com/u/2260302?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximilianos","html_url":"https://github.com/Maximilianos","followers_url":"https://api.github.com/users/Maximilianos/followers","following_url":"https://api.github.com/users/Maximilianos/following{/other_user}","gists_url":"https://api.github.com/users/Maximilianos/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximilianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximilianos/subscriptions","organizations_url":"https://api.github.com/users/Maximilianos/orgs","repos_url":"https://api.github.com/users/Maximilianos/repos","events_url":"https://api.github.com/users/Maximilianos/events{/privacy}","received_events_url":"https://api.github.com/users/Maximilianos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Maximilianos/filled-array","description":"Returns an array filled with the specified input","fork":true,"url":"https://api.github.com/repos/Maximilianos/filled-array","forks_url":"https://api.github.com/repos/Maximilianos/filled-array/forks","keys_url":"https://api.github.com/repos/Maximilianos/filled-array/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Maximilianos/filled-array/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Maximilianos/filled-array/teams","hooks_url":"https://api.github.com/repos/Maximilianos/filled-array/hooks","issue_events_url":"https://api.github.com/repos/Maximilianos/filled-array/issues/events{/number}","events_url":"https://api.github.com/repos/Maximilianos/filled-array/events","assignees_url":"https://api.github.com/repos/Maximilianos/filled-array/assignees{/user}","branches_url":"https://api.github.com/repos/Maximilianos/filled-array/branches{/branch}","tags_url":"https://api.github.com/repos/Maximilianos/filled-array/tags","blobs_url":"https://api.github.com/repos/Maximilianos/filled-array/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Maximilianos/filled-array/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Maximilianos/filled-array/git/refs{/sha}","trees_url":"https://api.github.com/repos/Maximilianos/filled-array/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Maximilianos/filled-array/statuses/{sha}","languages_url":"https://api.github.com/repos/Maximilianos/filled-array/languages","stargazers_url":"https://api.github.com/repos/Maximilianos/filled-array/stargazers","contributors_url":"https://api.github.com/repos/Maximilianos/filled-array/contributors","subscribers_url":"https://api.github.com/repos/Maximilianos/filled-array/subscribers","subscription_url":"https://api.github.com/repos/Maximilianos/filled-array/subscription","commits_url":"https://api.github.com/repos/Maximilianos/filled-array/commits{/sha}","git_commits_url":"https://api.github.com/repos/Maximilianos/filled-array/git/commits{/sha}","comments_url":"https://api.github.com/repos/Maximilianos/filled-array/comments{/number}","issue_comment_url":"https://api.github.com/repos/Maximilianos/filled-array/issues/comments{/number}","contents_url":"https://api.github.com/repos/Maximilianos/filled-array/contents/{+path}","compare_url":"https://api.github.com/repos/Maximilianos/filled-array/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Maximilianos/filled-array/merges","archive_url":"https://api.github.com/repos/Maximilianos/filled-array/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Maximilianos/filled-array/downloads","issues_url":"https://api.github.com/repos/Maximilianos/filled-array/issues{/number}","pulls_url":"https://api.github.com/repos/Maximilianos/filled-array/pulls{/number}","milestones_url":"https://api.github.com/repos/Maximilianos/filled-array/milestones{/number}","notifications_url":"https://api.github.com/repos/Maximilianos/filled-array/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Maximilianos/filled-array/labels{/name}","releases_url":"https://api.github.com/repos/Maximilianos/filled-array/releases{/id}","created_at":"2015-11-05T14:18:24Z","updated_at":"2015-11-05T14:18:25Z","pushed_at":"2015-11-05T20:17:26Z","git_url":"git://github.com/Maximilianos/filled-array.git","ssh_url":"git@github.com:Maximilianos/filled-array.git","clone_url":"https://github.com/Maximilianos/filled-array.git","svn_url":"https://github.com/Maximilianos/filled-array","homepage":null,"size":0,"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":"8a8247a443bddd61f67a195a4bcc41361b9cac41","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":45537166,"name":"filled-array","full_name":"sindresorhus/filled-array","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/filled-array","description":"Returns an array filled with the specified input","fork":false,"url":"https://api.github.com/repos/sindresorhus/filled-array","forks_url":"https://api.github.com/repos/sindresorhus/filled-array/forks","keys_url":"https://api.github.com/repos/sindresorhus/filled-array/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/filled-array/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/filled-array/teams","hooks_url":"https://api.github.com/repos/sindresorhus/filled-array/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/filled-array/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/filled-array/events","assignees_url":"https://api.github.com/repos/sindresorhus/filled-array/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/filled-array/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/filled-array/tags","blobs_url":"https://api.github.com/repos/sindresorhus/filled-array/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/filled-array/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/filled-array/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/filled-array/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/filled-array/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/filled-array/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/filled-array/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/filled-array/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/filled-array/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/filled-array/subscription","commits_url":"https://api.github.com/repos/sindresorhus/filled-array/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/filled-array/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/filled-array/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/filled-array/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/filled-array/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/filled-array/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/filled-array/merges","archive_url":"https://api.github.com/repos/sindresorhus/filled-array/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/filled-array/downloads","issues_url":"https://api.github.com/repos/sindresorhus/filled-array/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/filled-array/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/filled-array/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/filled-array/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/filled-array/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/filled-array/releases{/id}","created_at":"2015-11-04T12:20:44Z","updated_at":"2015-11-05T19:42:54Z","pushed_at":"2015-11-05T20:17:26Z","git_url":"git://github.com/sindresorhus/filled-array.git","ssh_url":"git@github.com:sindresorhus/filled-array.git","clone_url":"https://github.com/sindresorhus/filled-array.git","svn_url":"https://github.com/sindresorhus/filled-array","homepage":null,"size":0,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3"},"html":{"href":"https://github.com/sindresorhus/filled-array/pull/3"},"issue":{"href":"https://api.github.com/repos/sindresorhus/filled-array/issues/3"},"comments":{"href":"https://api.github.com/repos/sindresorhus/filled-array/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/filled-array/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/filled-array/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/filled-array/statuses/331476a9dfbef1b85e4fd1858d1484bfb37f2610"}}}}