{"action":"created","issue":{"url":"https://api.github.com/repos/ljharb/is-arrow-function/issues/2","labels_url":"https://api.github.com/repos/ljharb/is-arrow-function/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/ljharb/is-arrow-function/issues/2/comments","events_url":"https://api.github.com/repos/ljharb/is-arrow-function/issues/2/events","html_url":"https://github.com/ljharb/is-arrow-function/pull/2","id":128944594,"number":2,"title":"add support for strings","user":{"login":"tunnckoCore","id":5038030,"avatar_url":"https://avatars.githubusercontent.com/u/5038030?v=3","gravatar_id":"","url":"https://api.github.com/users/tunnckoCore","html_url":"https://github.com/tunnckoCore","followers_url":"https://api.github.com/users/tunnckoCore/followers","following_url":"https://api.github.com/users/tunnckoCore/following{/other_user}","gists_url":"https://api.github.com/users/tunnckoCore/gists{/gist_id}","starred_url":"https://api.github.com/users/tunnckoCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunnckoCore/subscriptions","organizations_url":"https://api.github.com/users/tunnckoCore/orgs","repos_url":"https://api.github.com/users/tunnckoCore/repos","events_url":"https://api.github.com/users/tunnckoCore/events{/privacy}","received_events_url":"https://api.github.com/users/tunnckoCore/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-26T21:16:23Z","updated_at":"2016-01-26T22:07:01Z","closed_at":"2016-01-26T22:07:01Z","pull_request":{"url":"https://api.github.com/repos/ljharb/is-arrow-function/pulls/2","html_url":"https://github.com/ljharb/is-arrow-function/pull/2","diff_url":"https://github.com/ljharb/is-arrow-function/pull/2.diff","patch_url":"https://github.com/ljharb/is-arrow-function/pull/2.patch"},"body":"add support for accepting string type and check against \r\n\r\n```js\r\nvar isArrowFunction = require('is-arrow-function');\r\nconsole.log(isArrowFunction('(a, b) => a * b'));\r\n// => true\r\n```"},"comment":{"url":"https://api.github.com/repos/ljharb/is-arrow-function/issues/comments/175254892","html_url":"https://github.com/ljharb/is-arrow-function/pull/2#issuecomment-175254892","issue_url":"https://api.github.com/repos/ljharb/is-arrow-function/issues/2","id":175254892,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T22:07:01Z","updated_at":"2016-01-26T22:07:01Z","body":"I see how this could be useful for you - but this module is called \"is arrow *function*\" - and, by using `Function#toString`, it takes advantage of source code normalization that the string approach would not benefit from.\r\n\r\nI don't think this is a good use case for this module - if you want to parse actual code, you should be using an actual JS parser that produces an AST, not using string operations."}}