{"action":"created","issue":{"url":"https://api.github.com/repos/google/flatbuffers/issues/4960","repository_url":"https://api.github.com/repos/google/flatbuffers","labels_url":"https://api.github.com/repos/google/flatbuffers/issues/4960/labels{/name}","comments_url":"https://api.github.com/repos/google/flatbuffers/issues/4960/comments","events_url":"https://api.github.com/repos/google/flatbuffers/issues/4960/events","html_url":"https://github.com/google/flatbuffers/pull/4960","id":365528578,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NDI3OTQw","number":4960,"title":"Javascript - Generate bidirectional mappings for enums","user":{"login":"tajmorton","id":1073184,"node_id":"MDQ6VXNlcjEwNzMxODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1073184?v=4","gravatar_id":"","url":"https://api.github.com/users/tajmorton","html_url":"https://github.com/tajmorton","followers_url":"https://api.github.com/users/tajmorton/followers","following_url":"https://api.github.com/users/tajmorton/following{/other_user}","gists_url":"https://api.github.com/users/tajmorton/gists{/gist_id}","starred_url":"https://api.github.com/users/tajmorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tajmorton/subscriptions","organizations_url":"https://api.github.com/users/tajmorton/orgs","repos_url":"https://api.github.com/users/tajmorton/repos","events_url":"https://api.github.com/users/tajmorton/events{/privacy}","received_events_url":"https://api.github.com/users/tajmorton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-01T15:56:19Z","updated_at":"2018-10-04T17:37:17Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/google/flatbuffers/pulls/4960","html_url":"https://github.com/google/flatbuffers/pull/4960","diff_url":"https://github.com/google/flatbuffers/pull/4960.diff","patch_url":"https://github.com/google/flatbuffers/pull/4960.patch"},"body":"This implements a feature described in #4506, generating a bi-directional mapping between enum name and enum value in Javascript. This makes it possible to lookup the name of an enum given its integer value.\r\n\r\n```js\r\nMyGame.Example.Color = {\r\n  Red: 1, 1: 'Red',\r\n  Green: 2, 2: 'Green',\r\n  Blue: 8, 8: 'Blue'\r\n};\r\n```\r\n\r\nThis makes it so you can do things like:\r\n```js\r\n   const my_color = MyGame.Example.Color.Red;\r\n   console.log(\"My color is \" + MyGame.Example.Color[my_color]);\r\n```"},"comment":{"url":"https://api.github.com/repos/google/flatbuffers/issues/comments/427106231","html_url":"https://github.com/google/flatbuffers/pull/4960#issuecomment-427106231","issue_url":"https://api.github.com/repos/google/flatbuffers/issues/4960","id":427106231,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzEwNjIzMQ==","user":{"login":"aardappel","id":4663648,"node_id":"MDQ6VXNlcjQ2NjM2NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/4663648?v=4","gravatar_id":"","url":"https://api.github.com/users/aardappel","html_url":"https://github.com/aardappel","followers_url":"https://api.github.com/users/aardappel/followers","following_url":"https://api.github.com/users/aardappel/following{/other_user}","gists_url":"https://api.github.com/users/aardappel/gists{/gist_id}","starred_url":"https://api.github.com/users/aardappel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aardappel/subscriptions","organizations_url":"https://api.github.com/users/aardappel/orgs","repos_url":"https://api.github.com/users/aardappel/repos","events_url":"https://api.github.com/users/aardappel/events{/privacy}","received_events_url":"https://api.github.com/users/aardappel/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T17:37:17Z","updated_at":"2018-10-04T17:37:17Z","author_association":"COLLABORATOR","body":"Thanks!"}}
{"actor":{"display_login":"aardappel"}}