{"action":"opened","number":17,"pull_request":{"url":"https://api.github.com/repos/facebook/jscodeshift/pulls/17","id":39956004,"html_url":"https://github.com/facebook/jscodeshift/pull/17","diff_url":"https://github.com/facebook/jscodeshift/pull/17.diff","patch_url":"https://github.com/facebook/jscodeshift/pull/17.patch","issue_url":"https://api.github.com/repos/facebook/jscodeshift/issues/17","number":17,"state":"open","locked":false,"title":"Add support for arrays to replaceWith, insertBefore and insertAfter.","user":{"login":"cpojer","id":13352,"avatar_url":"https://avatars.githubusercontent.com/u/13352?v=3","gravatar_id":"","url":"https://api.github.com/users/cpojer","html_url":"https://github.com/cpojer","followers_url":"https://api.github.com/users/cpojer/followers","following_url":"https://api.github.com/users/cpojer/following{/other_user}","gists_url":"https://api.github.com/users/cpojer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpojer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpojer/subscriptions","organizations_url":"https://api.github.com/users/cpojer/orgs","repos_url":"https://api.github.com/users/cpojer/repos","events_url":"https://api.github.com/users/cpojer/events{/privacy}","received_events_url":"https://api.github.com/users/cpojer/received_events","type":"User","site_admin":false},"body":"I've been working around this in my codemods so far, this makes it so that you can pass an array to these methods (or return an array from the replacer method). I also removed `functionify` and inlined it.\r\n\r\nI also added tests for insertAfter.","created_at":"2015-07-14T20:01:56Z","updated_at":"2015-07-14T20:01:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/jscodeshift/pulls/17/commits","review_comments_url":"https://api.github.com/repos/facebook/jscodeshift/pulls/17/comments","review_comment_url":"https://api.github.com/repos/facebook/jscodeshift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/jscodeshift/issues/17/comments","statuses_url":"https://api.github.com/repos/facebook/jscodeshift/statuses/1add539b74a238485f9835853be59b38909dc1f5","head":{"label":"facebook:replace-with","ref":"replace-with","sha":"1add539b74a238485f9835853be59b38909dc1f5","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":31795422,"name":"jscodeshift","full_name":"facebook/jscodeshift","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/jscodeshift","description":"A JavaScript codemod toolkit.","fork":false,"url":"https://api.github.com/repos/facebook/jscodeshift","forks_url":"https://api.github.com/repos/facebook/jscodeshift/forks","keys_url":"https://api.github.com/repos/facebook/jscodeshift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/jscodeshift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/jscodeshift/teams","hooks_url":"https://api.github.com/repos/facebook/jscodeshift/hooks","issue_events_url":"https://api.github.com/repos/facebook/jscodeshift/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/jscodeshift/events","assignees_url":"https://api.github.com/repos/facebook/jscodeshift/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/jscodeshift/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/jscodeshift/tags","blobs_url":"https://api.github.com/repos/facebook/jscodeshift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/jscodeshift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/jscodeshift/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/jscodeshift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/jscodeshift/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/jscodeshift/languages","stargazers_url":"https://api.github.com/repos/facebook/jscodeshift/stargazers","contributors_url":"https://api.github.com/repos/facebook/jscodeshift/contributors","subscribers_url":"https://api.github.com/repos/facebook/jscodeshift/subscribers","subscription_url":"https://api.github.com/repos/facebook/jscodeshift/subscription","commits_url":"https://api.github.com/repos/facebook/jscodeshift/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/jscodeshift/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/jscodeshift/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/jscodeshift/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/jscodeshift/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/jscodeshift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/jscodeshift/merges","archive_url":"https://api.github.com/repos/facebook/jscodeshift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/jscodeshift/downloads","issues_url":"https://api.github.com/repos/facebook/jscodeshift/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/jscodeshift/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/jscodeshift/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/jscodeshift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/jscodeshift/labels{/name}","releases_url":"https://api.github.com/repos/facebook/jscodeshift/releases{/id}","created_at":"2015-03-07T00:32:16Z","updated_at":"2015-07-14T09:56:05Z","pushed_at":"2015-07-14T20:00:50Z","git_url":"git://github.com/facebook/jscodeshift.git","ssh_url":"git@github.com:facebook/jscodeshift.git","clone_url":"https://github.com/facebook/jscodeshift.git","svn_url":"https://github.com/facebook/jscodeshift","homepage":"","size":356,"stargazers_count":68,"watchers_count":68,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":68,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"3d4776b6da417b0488a59d7290f0201676d23f36","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":31795422,"name":"jscodeshift","full_name":"facebook/jscodeshift","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/jscodeshift","description":"A JavaScript codemod toolkit.","fork":false,"url":"https://api.github.com/repos/facebook/jscodeshift","forks_url":"https://api.github.com/repos/facebook/jscodeshift/forks","keys_url":"https://api.github.com/repos/facebook/jscodeshift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/jscodeshift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/jscodeshift/teams","hooks_url":"https://api.github.com/repos/facebook/jscodeshift/hooks","issue_events_url":"https://api.github.com/repos/facebook/jscodeshift/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/jscodeshift/events","assignees_url":"https://api.github.com/repos/facebook/jscodeshift/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/jscodeshift/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/jscodeshift/tags","blobs_url":"https://api.github.com/repos/facebook/jscodeshift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/jscodeshift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/jscodeshift/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/jscodeshift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/jscodeshift/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/jscodeshift/languages","stargazers_url":"https://api.github.com/repos/facebook/jscodeshift/stargazers","contributors_url":"https://api.github.com/repos/facebook/jscodeshift/contributors","subscribers_url":"https://api.github.com/repos/facebook/jscodeshift/subscribers","subscription_url":"https://api.github.com/repos/facebook/jscodeshift/subscription","commits_url":"https://api.github.com/repos/facebook/jscodeshift/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/jscodeshift/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/jscodeshift/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/jscodeshift/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/jscodeshift/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/jscodeshift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/jscodeshift/merges","archive_url":"https://api.github.com/repos/facebook/jscodeshift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/jscodeshift/downloads","issues_url":"https://api.github.com/repos/facebook/jscodeshift/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/jscodeshift/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/jscodeshift/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/jscodeshift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/jscodeshift/labels{/name}","releases_url":"https://api.github.com/repos/facebook/jscodeshift/releases{/id}","created_at":"2015-03-07T00:32:16Z","updated_at":"2015-07-14T09:56:05Z","pushed_at":"2015-07-14T20:00:50Z","git_url":"git://github.com/facebook/jscodeshift.git","ssh_url":"git@github.com:facebook/jscodeshift.git","clone_url":"https://github.com/facebook/jscodeshift.git","svn_url":"https://github.com/facebook/jscodeshift","homepage":"","size":356,"stargazers_count":68,"watchers_count":68,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/jscodeshift/pulls/17"},"html":{"href":"https://github.com/facebook/jscodeshift/pull/17"},"issue":{"href":"https://api.github.com/repos/facebook/jscodeshift/issues/17"},"comments":{"href":"https://api.github.com/repos/facebook/jscodeshift/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/jscodeshift/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/jscodeshift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/jscodeshift/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/jscodeshift/statuses/1add539b74a238485f9835853be59b38909dc1f5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":105,"deletions":32,"changed_files":2}}