{"action":"created","issue":{"url":"https://api.github.com/repos/shouldjs/format/issues/4","labels_url":"https://api.github.com/repos/shouldjs/format/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/shouldjs/format/issues/4/comments","events_url":"https://api.github.com/repos/shouldjs/format/issues/4/events","html_url":"https://github.com/shouldjs/format/pull/4","id":122950725,"number":4,"title":"Fix `Formatter.functionName` TypeError for arrow functions","user":{"login":"mrtbld","id":11838792,"avatar_url":"https://avatars.githubusercontent.com/u/11838792?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtbld","html_url":"https://github.com/mrtbld","followers_url":"https://api.github.com/users/mrtbld/followers","following_url":"https://api.github.com/users/mrtbld/following{/other_user}","gists_url":"https://api.github.com/users/mrtbld/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtbld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtbld/subscriptions","organizations_url":"https://api.github.com/users/mrtbld/orgs","repos_url":"https://api.github.com/users/mrtbld/repos","events_url":"https://api.github.com/users/mrtbld/events{/privacy}","received_events_url":"https://api.github.com/users/mrtbld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-18T13:41:42Z","updated_at":"2015-12-18T14:02:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/shouldjs/format/pulls/4","html_url":"https://github.com/shouldjs/format/pull/4","diff_url":"https://github.com/shouldjs/format/pull/4.diff","patch_url":"https://github.com/shouldjs/format/pull/4.patch"},"body":"When called with an arrow function as parameter it threw a TypeError.\r\n\r\n    Formatter.functionName((a) => a)\r\n\r\nThe regular expression that matches the name from the function\r\ndeclaration string doesn't care about arrow function syntax, thus it\r\ndidn't match anything, `.match` returned `null` and `null[1]` threw:\r\n\r\n    TypeError: Cannot read property '1' of null"},"comment":{"url":"https://api.github.com/repos/shouldjs/format/issues/comments/165784685","html_url":"https://github.com/shouldjs/format/pull/4#issuecomment-165784685","issue_url":"https://api.github.com/repos/shouldjs/format/issues/4","id":165784685,"user":{"login":"mrtbld","id":11838792,"avatar_url":"https://avatars.githubusercontent.com/u/11838792?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtbld","html_url":"https://github.com/mrtbld","followers_url":"https://api.github.com/users/mrtbld/followers","following_url":"https://api.github.com/users/mrtbld/following{/other_user}","gists_url":"https://api.github.com/users/mrtbld/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtbld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtbld/subscriptions","organizations_url":"https://api.github.com/users/mrtbld/orgs","repos_url":"https://api.github.com/users/mrtbld/repos","events_url":"https://api.github.com/users/mrtbld/events{/privacy}","received_events_url":"https://api.github.com/users/mrtbld/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T14:02:24Z","updated_at":"2015-12-18T14:02:24Z","body":"It's not a bad idea but what about the message displayed by `should` (in case of failed assertion)? I.e. :\r\n\r\n```\r\nAssertionError: expected Function { name: '=>' } to throw exception\r\n```\r\n\r\nA bit awkward don't you think ? :-)"}}