{"action":"created","issue":{"url":"https://api.github.com/repos/stryker-mutator/stryker/issues/1133","repository_url":"https://api.github.com/repos/stryker-mutator/stryker","labels_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/1133/labels{/name}","comments_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/1133/comments","events_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/1133/events","html_url":"https://github.com/stryker-mutator/stryker/issues/1133","id":358716684,"node_id":"MDU6SXNzdWUzNTg3MTY2ODQ=","number":1133,"title":"strange part of code","user":{"login":"kmdrGroch","id":28489774,"node_id":"MDQ6VXNlcjI4NDg5Nzc0","avatar_url":"https://avatars1.githubusercontent.com/u/28489774?v=4","gravatar_id":"","url":"https://api.github.com/users/kmdrGroch","html_url":"https://github.com/kmdrGroch","followers_url":"https://api.github.com/users/kmdrGroch/followers","following_url":"https://api.github.com/users/kmdrGroch/following{/other_user}","gists_url":"https://api.github.com/users/kmdrGroch/gists{/gist_id}","starred_url":"https://api.github.com/users/kmdrGroch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmdrGroch/subscriptions","organizations_url":"https://api.github.com/users/kmdrGroch/orgs","repos_url":"https://api.github.com/users/kmdrGroch/repos","events_url":"https://api.github.com/users/kmdrGroch/events{/privacy}","received_events_url":"https://api.github.com/users/kmdrGroch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-10T17:18:49Z","updated_at":"2018-10-15T10:45:05Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I have been looking through the code and I noticed some strange code:\r\n```typescript\r\nfunction isPrimitive(value: any) {\r\n  return value !== 'object' && !Array.isArray(value);\r\n}\r\n```\r\nshouldn't it be sth like:\r\n```typescript\r\nfunction isPrimitive(value: any) {\r\n  return typeof value !== 'object' && !Array.isArray(value);\r\n}\r\n```\r\n+ value can also be ``typeof function`` so all cases haven't been checked. (if you don't count NaN as a primitive then also NaN should be checked)\r\n\r\npath: stryker\\packages\\stryker\\test\\helpers\\producers.ts\r\n\r\nso final code i suppose should be is like:\r\n```typescript\r\nfunction isPrimitive(value: any) {\r\n  if(typeof value === 'number' && isNaN(value)) return false;\r\n  if(typeof value !== 'object' && typeof value !== 'function') return true;\r\n  return false;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/stryker-mutator/stryker/issues/comments/429800518","html_url":"https://github.com/stryker-mutator/stryker/issues/1133#issuecomment-429800518","issue_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/1133","id":429800518,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTgwMDUxOA==","user":{"login":"nicojs","id":1828233,"node_id":"MDQ6VXNlcjE4MjgyMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1828233?v=4","gravatar_id":"","url":"https://api.github.com/users/nicojs","html_url":"https://github.com/nicojs","followers_url":"https://api.github.com/users/nicojs/followers","following_url":"https://api.github.com/users/nicojs/following{/other_user}","gists_url":"https://api.github.com/users/nicojs/gists{/gist_id}","starred_url":"https://api.github.com/users/nicojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicojs/subscriptions","organizations_url":"https://api.github.com/users/nicojs/orgs","repos_url":"https://api.github.com/users/nicojs/repos","events_url":"https://api.github.com/users/nicojs/events{/privacy}","received_events_url":"https://api.github.com/users/nicojs/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T10:45:05Z","updated_at":"2018-10-15T10:45:05Z","author_association":"MEMBER","body":"This is indeed a problem. Good proposal. Looking forward to a PR 👍 😎 "}}
{"actor":{"display_login":"nicojs"}}