{"action":"closed","issue":{"url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/657","repository_url":"https://api.github.com/repos/mishoo/UglifyJS2","labels_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/657/labels{/name}","comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/657/comments","events_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/657/events","html_url":"https://github.com/mishoo/UglifyJS2/issues/657","id":64274668,"number":657,"title":"Strip true && something() into something()","user":{"login":"EloB","id":476567,"avatar_url":"https://avatars.githubusercontent.com/u/476567?v=3","gravatar_id":"","url":"https://api.github.com/users/EloB","html_url":"https://github.com/EloB","followers_url":"https://api.github.com/users/EloB/followers","following_url":"https://api.github.com/users/EloB/following{/other_user}","gists_url":"https://api.github.com/users/EloB/gists{/gist_id}","starred_url":"https://api.github.com/users/EloB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EloB/subscriptions","organizations_url":"https://api.github.com/users/EloB/orgs","repos_url":"https://api.github.com/users/EloB/repos","events_url":"https://api.github.com/users/EloB/events{/privacy}","received_events_url":"https://api.github.com/users/EloB/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-25T13:53:48Z","updated_at":"2016-05-26T14:00:13Z","closed_at":"2016-05-26T14:00:13Z","body":"If you use `webpack.DefinePlugin` and you have a constant `DEV` for instance that is either transformed into `true` or `false` and want todo a quick and dirty execution of a function without doing a `if` statement. Like my example below.\r\n\r\n**Example:**\r\n```\r\nDEV && doSomething();\r\n\r\nif(DEV) {\r\n  doSomethingElse();\r\n}\r\n```\r\n\r\n**Example will be transformed into when using `webpack.DefinePlugin({ DEV: true })`:**\r\n```js\r\ntrue && doSomething();\r\n\r\nif(true) {\r\n  doSomethingElse();\r\n}\r\n```\r\n\r\n**Current compression:**\r\n```js\r\n!0&&doSomething(),doSomethingElse()\r\n```\r\n\r\n**Suggested compression:**\r\n```js\r\ndoSomething(),doSomethingElse()\r\n```\r\n\r\nWhat do you think about it?"}}
{"actor":{"display_login":"EloB"}}