{"action":"created","issue":{"url":"https://api.github.com/repos/nunnly/everycode/issues/46","labels_url":"https://api.github.com/repos/nunnly/everycode/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/nunnly/everycode/issues/46/comments","events_url":"https://api.github.com/repos/nunnly/everycode/issues/46/events","html_url":"https://github.com/nunnly/everycode/issues/46","id":67031373,"number":46,"title":"统计字符串内字符出现的个数","user":{"login":"007killyou","id":3992596,"avatar_url":"https://avatars.githubusercontent.com/u/3992596?v=3","gravatar_id":"","url":"https://api.github.com/users/007killyou","html_url":"https://github.com/007killyou","followers_url":"https://api.github.com/users/007killyou/followers","following_url":"https://api.github.com/users/007killyou/following{/other_user}","gists_url":"https://api.github.com/users/007killyou/gists{/gist_id}","starred_url":"https://api.github.com/users/007killyou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/007killyou/subscriptions","organizations_url":"https://api.github.com/users/007killyou/orgs","repos_url":"https://api.github.com/users/007killyou/repos","events_url":"https://api.github.com/users/007killyou/events{/privacy}","received_events_url":"https://api.github.com/users/007killyou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-08T02:12:21Z","updated_at":"2015-07-06T09:22:07Z","closed_at":null,"body":"var genCode = 'TCCAGAAAGGTAAGCCTCGCGTTGCG' //只限4个字母。可考虑实现多个字母的情况\r\nvar result = getCountedNucleotides(getCode);\r\nconsole.log(result) // {\"A\":0, \"C\":0, \"G\":0, \"T\":0}"},"comment":{"url":"https://api.github.com/repos/nunnly/everycode/issues/comments/118783874","html_url":"https://github.com/nunnly/everycode/issues/46#issuecomment-118783874","issue_url":"https://api.github.com/repos/nunnly/everycode/issues/46","id":118783874,"user":{"login":"Jonavin","id":3949585,"avatar_url":"https://avatars.githubusercontent.com/u/3949585?v=3","gravatar_id":"","url":"https://api.github.com/users/Jonavin","html_url":"https://github.com/Jonavin","followers_url":"https://api.github.com/users/Jonavin/followers","following_url":"https://api.github.com/users/Jonavin/following{/other_user}","gists_url":"https://api.github.com/users/Jonavin/gists{/gist_id}","starred_url":"https://api.github.com/users/Jonavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jonavin/subscriptions","organizations_url":"https://api.github.com/users/Jonavin/orgs","repos_url":"https://api.github.com/users/Jonavin/repos","events_url":"https://api.github.com/users/Jonavin/events{/privacy}","received_events_url":"https://api.github.com/users/Jonavin/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T09:22:07Z","updated_at":"2015-07-06T09:22:07Z","body":"```javascript\r\n function getCountedNucleotides (str){\r\n      var reg = /(\\w)?\\1*/g,\r\n          match = str.match(reg),\r\n          ret = {},\r\n          i=match.length;\r\n      for(;i--;){\r\n        var mi = match[i],\r\n            fc = mi[0];\r\n        ret[fc] = (!!ret[fc])?(+ret[fc])+mi.length:mi.length\r\n      }\r\n      return ret;\r\n    }\r\n```"}}