{"action":"created","comment":{"url":"https://api.github.com/repos/midknight41/map-factory/pulls/comments/75000718","id":75000718,"diff_hunk":"@@ -11,6 +11,7 @@ export interface IMapFactory {\n   (stringOrArray: string | string[]): IMapping;\n   map(stringOrArray: string | string[]): IMapping;\n   execute(source?, destination?);","path":"lib/interfaces.ts","position":null,"original_position":3,"commit_id":"d4f8950b7f13ab54c967fc4d9176798a0a851065","original_commit_id":"f1714c63c7802921441d24b5db455e0a03b09005","user":{"login":"midknight41","id":1275610,"avatar_url":"https://avatars.githubusercontent.com/u/1275610?v=3","gravatar_id":"","url":"https://api.github.com/users/midknight41","html_url":"https://github.com/midknight41","followers_url":"https://api.github.com/users/midknight41/followers","following_url":"https://api.github.com/users/midknight41/following{/other_user}","gists_url":"https://api.github.com/users/midknight41/gists{/gist_id}","starred_url":"https://api.github.com/users/midknight41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/midknight41/subscriptions","organizations_url":"https://api.github.com/users/midknight41/orgs","repos_url":"https://api.github.com/users/midknight41/repos","events_url":"https://api.github.com/users/midknight41/events{/privacy}","received_events_url":"https://api.github.com/users/midknight41/received_events","type":"User","site_admin":false},"body":"I'm coming around on using babel btw...","created_at":"2016-08-16T19:10:40Z","updated_at":"2016-08-16T19:10:40Z","html_url":"https://github.com/midknight41/map-factory/pull/22#discussion_r75000718","pull_request_url":"https://api.github.com/repos/midknight41/map-factory/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/midknight41/map-factory/pulls/comments/75000718"},"html":{"href":"https://github.com/midknight41/map-factory/pull/22#discussion_r75000718"},"pull_request":{"href":"https://api.github.com/repos/midknight41/map-factory/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/midknight41/map-factory/pulls/22","id":81506111,"html_url":"https://github.com/midknight41/map-factory/pull/22","diff_url":"https://github.com/midknight41/map-factory/pull/22.diff","patch_url":"https://github.com/midknight41/map-factory/pull/22.patch","issue_url":"https://api.github.com/repos/midknight41/map-factory/issues/22","number":22,"state":"open","locked":false,"title":"added maper.each() feature and tests","user":{"login":"midknight41","id":1275610,"avatar_url":"https://avatars.githubusercontent.com/u/1275610?v=3","gravatar_id":"","url":"https://api.github.com/users/midknight41","html_url":"https://github.com/midknight41","followers_url":"https://api.github.com/users/midknight41/followers","following_url":"https://api.github.com/users/midknight41/following{/other_user}","gists_url":"https://api.github.com/users/midknight41/gists{/gist_id}","starred_url":"https://api.github.com/users/midknight41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/midknight41/subscriptions","organizations_url":"https://api.github.com/users/midknight41/orgs","repos_url":"https://api.github.com/users/midknight41/repos","events_url":"https://api.github.com/users/midknight41/events{/privacy}","received_events_url":"https://api.github.com/users/midknight41/received_events","type":"User","site_admin":false},"body":"@blacksun1 This is just a a convenience method to make working with multiple mappers easier. It's useful when the object structures when the child objects have the same structure but the main object structure doesn't lend itself to a single dot notation query.\r\n\r\n```js\r\n    const source = {\r\n      one: [{value: \"a\", drop: \"me\" }, {value: \"b\", drop: \"me\"  }, {value: \"c\", drop: \"me\"  }],\r\n      two: [{value: \"a\", drop: \"me\"  }, {value: \"b\", drop: \"me\"  }, {value: \"c\", drop: \"me\"  }],\r\n      three: [{value: \"a\", drop: \"me\"  }, {value: \"b\", drop: \"me\"  }, {value: \"c\", drop: \"me\"  }]\r\n    };\r\n\r\n    const expected = {\r\n      one: [{newOne: \"a\" }, {newOne: \"b\" }, {newOne: \"c\" }],\r\n      two: [{newOne: \"a\" }, {newOne: \"b\" }, {newOne: \"c\" }],\r\n      three: [{newOne: \"a\" }, {newOne: \"b\" }, {newOne: \"c\" }]\r\n    };\r\n\r\n    const mainMapper = createMapper();\r\n    const childMapper = createMapper();\r\n\r\n    childMapper\r\n      .map(\"value\").to(\"newOne\");\r\n\r\n    mainMapper\r\n      .map(\"one\").to(\"one\", array => childMapper.each(array))\r\n      .map(\"two\").to(\"two\", array => childMapper.each(array))\r\n      .map(\"three\").to(\"three\", array => childMapper.each(array));\r\n\r\n    const actual = mainMapper.execute(source);\r\n``` ","created_at":"2016-08-16T16:51:28Z","updated_at":"2016-08-16T19:10:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebc6f1aec46068cd7351f77b4bbb6353b9e27308","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/midknight41/map-factory/pulls/22/commits","review_comments_url":"https://api.github.com/repos/midknight41/map-factory/pulls/22/comments","review_comment_url":"https://api.github.com/repos/midknight41/map-factory/pulls/comments{/number}","comments_url":"https://api.github.com/repos/midknight41/map-factory/issues/22/comments","statuses_url":"https://api.github.com/repos/midknight41/map-factory/statuses/d4f8950b7f13ab54c967fc4d9176798a0a851065","head":{"label":"midknight41:each-feature","ref":"each-feature","sha":"d4f8950b7f13ab54c967fc4d9176798a0a851065","user":{"login":"midknight41","id":1275610,"avatar_url":"https://avatars.githubusercontent.com/u/1275610?v=3","gravatar_id":"","url":"https://api.github.com/users/midknight41","html_url":"https://github.com/midknight41","followers_url":"https://api.github.com/users/midknight41/followers","following_url":"https://api.github.com/users/midknight41/following{/other_user}","gists_url":"https://api.github.com/users/midknight41/gists{/gist_id}","starred_url":"https://api.github.com/users/midknight41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/midknight41/subscriptions","organizations_url":"https://api.github.com/users/midknight41/orgs","repos_url":"https://api.github.com/users/midknight41/repos","events_url":"https://api.github.com/users/midknight41/events{/privacy}","received_events_url":"https://api.github.com/users/midknight41/received_events","type":"User","site_admin":false},"repo":{"id":62112874,"name":"map-factory","full_name":"midknight41/map-factory","owner":{"login":"midknight41","id":1275610,"avatar_url":"https://avatars.githubusercontent.com/u/1275610?v=3","gravatar_id":"","url":"https://api.github.com/users/midknight41","html_url":"https://github.com/midknight41","followers_url":"https://api.github.com/users/midknight41/followers","following_url":"https://api.github.com/users/midknight41/following{/other_user}","gists_url":"https://api.github.com/users/midknight41/gists{/gist_id}","starred_url":"https://api.github.com/users/midknight41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/midknight41/subscriptions","organizations_url":"https://api.github.com/users/midknight41/orgs","repos_url":"https://api.github.com/users/midknight41/repos","events_url":"https://api.github.com/users/midknight41/events{/privacy}","received_events_url":"https://api.github.com/users/midknight41/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/midknight41/map-factory","description":"A simple utility to map data from an existing object to a new one.","fork":false,"url":"https://api.github.com/repos/midknight41/map-factory","forks_url":"https://api.github.com/repos/midknight41/map-factory/forks","keys_url":"https://api.github.com/repos/midknight41/map-factory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/midknight41/map-factory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/midknight41/map-factory/teams","hooks_url":"https://api.github.com/repos/midknight41/map-factory/hooks","issue_events_url":"https://api.github.com/repos/midknight41/map-factory/issues/events{/number}","events_url":"https://api.github.com/repos/midknight41/map-factory/events","assignees_url":"https://api.github.com/repos/midknight41/map-factory/assignees{/user}","branches_url":"https://api.github.com/repos/midknight41/map-factory/branches{/branch}","tags_url":"https://api.github.com/repos/midknight41/map-factory/tags","blobs_url":"https://api.github.com/repos/midknight41/map-factory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/midknight41/map-factory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/midknight41/map-factory/git/refs{/sha}","trees_url":"https://api.github.com/repos/midknight41/map-factory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/midknight41/map-factory/statuses/{sha}","languages_url":"https://api.github.com/repos/midknight41/map-factory/languages","stargazers_url":"https://api.github.com/repos/midknight41/map-factory/stargazers","contributors_url":"https://api.github.com/repos/midknight41/map-factory/contributors","subscribers_url":"https://api.github.com/repos/midknight41/map-factory/subscribers","subscription_url":"https://api.github.com/repos/midknight41/map-factory/subscription","commits_url":"https://api.github.com/repos/midknight41/map-factory/commits{/sha}","git_commits_url":"https://api.github.com/repos/midknight41/map-factory/git/commits{/sha}","comments_url":"https://api.github.com/repos/midknight41/map-factory/comments{/number}","issue_comment_url":"https://api.github.com/repos/midknight41/map-factory/issues/comments{/number}","contents_url":"https://api.github.com/repos/midknight41/map-factory/contents/{+path}","compare_url":"https://api.github.com/repos/midknight41/map-factory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/midknight41/map-factory/merges","archive_url":"https://api.github.com/repos/midknight41/map-factory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/midknight41/map-factory/downloads","issues_url":"https://api.github.com/repos/midknight41/map-factory/issues{/number}","pulls_url":"https://api.github.com/repos/midknight41/map-factory/pulls{/number}","milestones_url":"https://api.github.com/repos/midknight41/map-factory/milestones{/number}","notifications_url":"https://api.github.com/repos/midknight41/map-factory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/midknight41/map-factory/labels{/name}","releases_url":"https://api.github.com/repos/midknight41/map-factory/releases{/id}","deployments_url":"https://api.github.com/repos/midknight41/map-factory/deployments","created_at":"2016-06-28T05:35:11Z","updated_at":"2016-07-17T06:15:14Z","pushed_at":"2016-08-16T19:06:07Z","git_url":"git://github.com/midknight41/map-factory.git","ssh_url":"git@github.com:midknight41/map-factory.git","clone_url":"https://github.com/midknight41/map-factory.git","svn_url":"https://github.com/midknight41/map-factory","homepage":"","size":78,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"midknight41:master","ref":"master","sha":"6b4abee122bf5f0236510449de9a1d0814575692","user":{"login":"midknight41","id":1275610,"avatar_url":"https://avatars.githubusercontent.com/u/1275610?v=3","gravatar_id":"","url":"https://api.github.com/users/midknight41","html_url":"https://github.com/midknight41","followers_url":"https://api.github.com/users/midknight41/followers","following_url":"https://api.github.com/users/midknight41/following{/other_user}","gists_url":"https://api.github.com/users/midknight41/gists{/gist_id}","starred_url":"https://api.github.com/users/midknight41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/midknight41/subscriptions","organizations_url":"https://api.github.com/users/midknight41/orgs","repos_url":"https://api.github.com/users/midknight41/repos","events_url":"https://api.github.com/users/midknight41/events{/privacy}","received_events_url":"https://api.github.com/users/midknight41/received_events","type":"User","site_admin":false},"repo":{"id":62112874,"name":"map-factory","full_name":"midknight41/map-factory","owner":{"login":"midknight41","id":1275610,"avatar_url":"https://avatars.githubusercontent.com/u/1275610?v=3","gravatar_id":"","url":"https://api.github.com/users/midknight41","html_url":"https://github.com/midknight41","followers_url":"https://api.github.com/users/midknight41/followers","following_url":"https://api.github.com/users/midknight41/following{/other_user}","gists_url":"https://api.github.com/users/midknight41/gists{/gist_id}","starred_url":"https://api.github.com/users/midknight41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/midknight41/subscriptions","organizations_url":"https://api.github.com/users/midknight41/orgs","repos_url":"https://api.github.com/users/midknight41/repos","events_url":"https://api.github.com/users/midknight41/events{/privacy}","received_events_url":"https://api.github.com/users/midknight41/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/midknight41/map-factory","description":"A simple utility to map data from an existing object to a new one.","fork":false,"url":"https://api.github.com/repos/midknight41/map-factory","forks_url":"https://api.github.com/repos/midknight41/map-factory/forks","keys_url":"https://api.github.com/repos/midknight41/map-factory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/midknight41/map-factory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/midknight41/map-factory/teams","hooks_url":"https://api.github.com/repos/midknight41/map-factory/hooks","issue_events_url":"https://api.github.com/repos/midknight41/map-factory/issues/events{/number}","events_url":"https://api.github.com/repos/midknight41/map-factory/events","assignees_url":"https://api.github.com/repos/midknight41/map-factory/assignees{/user}","branches_url":"https://api.github.com/repos/midknight41/map-factory/branches{/branch}","tags_url":"https://api.github.com/repos/midknight41/map-factory/tags","blobs_url":"https://api.github.com/repos/midknight41/map-factory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/midknight41/map-factory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/midknight41/map-factory/git/refs{/sha}","trees_url":"https://api.github.com/repos/midknight41/map-factory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/midknight41/map-factory/statuses/{sha}","languages_url":"https://api.github.com/repos/midknight41/map-factory/languages","stargazers_url":"https://api.github.com/repos/midknight41/map-factory/stargazers","contributors_url":"https://api.github.com/repos/midknight41/map-factory/contributors","subscribers_url":"https://api.github.com/repos/midknight41/map-factory/subscribers","subscription_url":"https://api.github.com/repos/midknight41/map-factory/subscription","commits_url":"https://api.github.com/repos/midknight41/map-factory/commits{/sha}","git_commits_url":"https://api.github.com/repos/midknight41/map-factory/git/commits{/sha}","comments_url":"https://api.github.com/repos/midknight41/map-factory/comments{/number}","issue_comment_url":"https://api.github.com/repos/midknight41/map-factory/issues/comments{/number}","contents_url":"https://api.github.com/repos/midknight41/map-factory/contents/{+path}","compare_url":"https://api.github.com/repos/midknight41/map-factory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/midknight41/map-factory/merges","archive_url":"https://api.github.com/repos/midknight41/map-factory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/midknight41/map-factory/downloads","issues_url":"https://api.github.com/repos/midknight41/map-factory/issues{/number}","pulls_url":"https://api.github.com/repos/midknight41/map-factory/pulls{/number}","milestones_url":"https://api.github.com/repos/midknight41/map-factory/milestones{/number}","notifications_url":"https://api.github.com/repos/midknight41/map-factory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/midknight41/map-factory/labels{/name}","releases_url":"https://api.github.com/repos/midknight41/map-factory/releases{/id}","deployments_url":"https://api.github.com/repos/midknight41/map-factory/deployments","created_at":"2016-06-28T05:35:11Z","updated_at":"2016-07-17T06:15:14Z","pushed_at":"2016-08-16T19:06:07Z","git_url":"git://github.com/midknight41/map-factory.git","ssh_url":"git@github.com:midknight41/map-factory.git","clone_url":"https://github.com/midknight41/map-factory.git","svn_url":"https://github.com/midknight41/map-factory","homepage":"","size":78,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/midknight41/map-factory/pulls/22"},"html":{"href":"https://github.com/midknight41/map-factory/pull/22"},"issue":{"href":"https://api.github.com/repos/midknight41/map-factory/issues/22"},"comments":{"href":"https://api.github.com/repos/midknight41/map-factory/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/midknight41/map-factory/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/midknight41/map-factory/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/midknight41/map-factory/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/midknight41/map-factory/statuses/d4f8950b7f13ab54c967fc4d9176798a0a851065"}}}}
{"actor":{"display_login":"midknight41"}}