{"action":"opened","issue":{"url":"https://api.github.com/repos/gf-rd/es6-coding-style/issues/5","repository_url":"https://api.github.com/repos/gf-rd/es6-coding-style","labels_url":"https://api.github.com/repos/gf-rd/es6-coding-style/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/gf-rd/es6-coding-style/issues/5/comments","events_url":"https://api.github.com/repos/gf-rd/es6-coding-style/issues/5/events","html_url":"https://github.com/gf-rd/es6-coding-style/issues/5","id":161058467,"number":5,"title":"勘误说明","user":{"login":"woodbrick","id":7042232,"avatar_url":"https://avatars.githubusercontent.com/u/7042232?v=3","gravatar_id":"","url":"https://api.github.com/users/woodbrick","html_url":"https://github.com/woodbrick","followers_url":"https://api.github.com/users/woodbrick/followers","following_url":"https://api.github.com/users/woodbrick/following{/other_user}","gists_url":"https://api.github.com/users/woodbrick/gists{/gist_id}","starred_url":"https://api.github.com/users/woodbrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woodbrick/subscriptions","organizations_url":"https://api.github.com/users/woodbrick/orgs","repos_url":"https://api.github.com/users/woodbrick/repos","events_url":"https://api.github.com/users/woodbrick/events{/privacy}","received_events_url":"https://api.github.com/users/woodbrick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-19T06:08:16Z","updated_at":"2016-06-19T06:08:16Z","closed_at":null,"body":"Hi，读了这份规范，我觉得受益良多，但也发现一些问题，希望能稍加修正，让这份文档帮助更多人\r\n\r\n在位置 3.3.1 若函数形参为对象时，使用对象解构赋值\r\n// 好\r\nfunction someFun(opt) {\r\n  let { opt1, opt2 } = opt;\r\n  console.log(`$(opt1) 加上 $(opt2)`);==》这里的参数模板应该是(`${opt1} 加上 ${opt2}`\r\n}\r\n\r\n5.4 函数参数指定默认值\r\n// 不好\r\nfunction foo(opts) {\r\n  opts = opts || {};// 此处有将0，''等假值转换掉为默认值的副作用==>// 此处有将0，''等假值转换成为默认值的副作用\r\n}\r\n"}}
{"actor":{"display_login":"woodbrick"}}