{"action":"created","issue":{"url":"https://api.github.com/repos/dependents/node-detective-es6/issues/9","repository_url":"https://api.github.com/repos/dependents/node-detective-es6","labels_url":"https://api.github.com/repos/dependents/node-detective-es6/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/dependents/node-detective-es6/issues/9/comments","events_url":"https://api.github.com/repos/dependents/node-detective-es6/issues/9/events","html_url":"https://github.com/dependents/node-detective-es6/issues/9","id":179022530,"number":9,"title":"mapping an array of files to detectiveEs6() gives an error","user":{"login":"lmj0011","id":9396189,"avatar_url":"https://avatars.githubusercontent.com/u/9396189?v=3","gravatar_id":"","url":"https://api.github.com/users/lmj0011","html_url":"https://github.com/lmj0011","followers_url":"https://api.github.com/users/lmj0011/followers","following_url":"https://api.github.com/users/lmj0011/following{/other_user}","gists_url":"https://api.github.com/users/lmj0011/gists{/gist_id}","starred_url":"https://api.github.com/users/lmj0011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmj0011/subscriptions","organizations_url":"https://api.github.com/users/lmj0011/orgs","repos_url":"https://api.github.com/users/lmj0011/repos","events_url":"https://api.github.com/users/lmj0011/events{/privacy}","received_events_url":"https://api.github.com/users/lmj0011/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-24T10:02:59Z","updated_at":"2016-09-25T01:49:53Z","closed_at":"2016-09-25T01:48:37Z","body":"I'm passing an array of files to the function `detectiveEs6()`\r\nex.A gives me an error of the sort `Error: src was not given to detectiveEs6 `\r\n\r\n\r\n```javascript\r\nconst detectiveEs6 = require('detective-es6');\r\n//[...]\r\nlet files = [...]  //valid file paths\r\n```\r\n\r\nex.A\r\n```javascript\r\nlet importPrms = files.map((path)=> {\r\n\r\n  let prm = new Promise((resolve, reject)=> {\r\n    let src = fs.readFileSync(path, 'utf8');\r\n    resolve(detectiveEs6(src));    // this throws an error\r\n  });\r\n\r\n  return prm;\r\n});\r\n```\r\n\r\nex.B\r\n```javascript\r\nlet importPrms = files.map((path)=> {\r\n\r\n  let prm = new Promise((resolve, reject)=> {\r\n    let src = fs.readFileSync(path, 'utf8');\r\n    resolve(detectiveEs6(src || ' '));  // this works\r\n  });\r\n\r\n  return prm;\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/dependents/node-detective-es6/issues/comments/249397671","html_url":"https://github.com/dependents/node-detective-es6/issues/9#issuecomment-249397671","issue_url":"https://api.github.com/repos/dependents/node-detective-es6/issues/9","id":249397671,"user":{"login":"mrjoelkemp","id":865203,"avatar_url":"https://avatars.githubusercontent.com/u/865203?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjoelkemp","html_url":"https://github.com/mrjoelkemp","followers_url":"https://api.github.com/users/mrjoelkemp/followers","following_url":"https://api.github.com/users/mrjoelkemp/following{/other_user}","gists_url":"https://api.github.com/users/mrjoelkemp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjoelkemp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjoelkemp/subscriptions","organizations_url":"https://api.github.com/users/mrjoelkemp/orgs","repos_url":"https://api.github.com/users/mrjoelkemp/repos","events_url":"https://api.github.com/users/mrjoelkemp/events{/privacy}","received_events_url":"https://api.github.com/users/mrjoelkemp/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T01:49:53Z","updated_at":"2016-09-25T01:49:53Z","body":"@lmj0011 I had some availability to work on this tonight; figured I'd get it fixed. I just cut a patch release with the fix.\r\n\r\nThanks again!"}}
{"actor":{"display_login":"mrjoelkemp"}}