{"action":"created","issue":{"url":"https://api.github.com/repos/ccgus/CocoaScript/issues/51","repository_url":"https://api.github.com/repos/ccgus/CocoaScript","labels_url":"https://api.github.com/repos/ccgus/CocoaScript/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/ccgus/CocoaScript/issues/51/comments","events_url":"https://api.github.com/repos/ccgus/CocoaScript/issues/51/events","html_url":"https://github.com/ccgus/CocoaScript/pull/51","id":274187021,"number":51,"title":"fix Mocha_getProperty for macOS 10.13.2","user":{"login":"mathieudutour","id":3254314,"avatar_url":"https://avatars2.githubusercontent.com/u/3254314?v=4","gravatar_id":"","url":"https://api.github.com/users/mathieudutour","html_url":"https://github.com/mathieudutour","followers_url":"https://api.github.com/users/mathieudutour/followers","following_url":"https://api.github.com/users/mathieudutour/following{/other_user}","gists_url":"https://api.github.com/users/mathieudutour/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieudutour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieudutour/subscriptions","organizations_url":"https://api.github.com/users/mathieudutour/orgs","repos_url":"https://api.github.com/users/mathieudutour/repos","events_url":"https://api.github.com/users/mathieudutour/events{/privacy}","received_events_url":"https://api.github.com/users/mathieudutour/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-15T15:01:16Z","updated_at":"2018-02-18T21:07:01Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ccgus/CocoaScript/pulls/51","html_url":"https://github.com/ccgus/CocoaScript/pull/51","diff_url":"https://github.com/ccgus/CocoaScript/pull/51.diff","patch_url":"https://github.com/ccgus/CocoaScript/pull/51.patch"},"body":"macOS 10.13.2 has a new class called `Function` so we need\r\nto explicitly check for it, same way as we were checking\r\nfor `Object`"},"comment":{"url":"https://api.github.com/repos/ccgus/CocoaScript/issues/comments/366547720","html_url":"https://github.com/ccgus/CocoaScript/pull/51#issuecomment-366547720","issue_url":"https://api.github.com/repos/ccgus/CocoaScript/issues/51","id":366547720,"user":{"login":"mathieudutour","id":3254314,"avatar_url":"https://avatars2.githubusercontent.com/u/3254314?v=4","gravatar_id":"","url":"https://api.github.com/users/mathieudutour","html_url":"https://github.com/mathieudutour","followers_url":"https://api.github.com/users/mathieudutour/followers","following_url":"https://api.github.com/users/mathieudutour/following{/other_user}","gists_url":"https://api.github.com/users/mathieudutour/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieudutour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieudutour/subscriptions","organizations_url":"https://api.github.com/users/mathieudutour/orgs","repos_url":"https://api.github.com/users/mathieudutour/repos","events_url":"https://api.github.com/users/mathieudutour/events{/privacy}","received_events_url":"https://api.github.com/users/mathieudutour/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T21:07:01Z","updated_at":"2018-02-18T21:07:01Z","author_association":"CONTRIBUTOR","body":"`!a && !b === !(a || b)` so we are both right ;)\r\n\r\n[`lodash`](https://lodash.com) uses `Function` in one of its methods:\r\n```js\r\nfunction isNative(fn) {\r\n  // Based on isNative() from Lodash\r\n  var funcToString = Function.prototype.toString;\r\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\r\n  var reIsNative = RegExp('^' + funcToString\r\n  // Take an example native function source for comparison\r\n  .call(hasOwnProperty\r\n  // Strip regex characters so we can use it for regex\r\n  ).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&'\r\n  // Remove hasOwnProperty from the template to make it generic\r\n  ).replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\r\n  try {\r\n    var source = funcToString.call(fn);\r\n    return reIsNative.test(source);\r\n  } catch (err) {\r\n    return false;\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"mathieudutour"}}