{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/regenerator/issues/165","labels_url":"https://api.github.com/repos/facebook/regenerator/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/facebook/regenerator/issues/165/comments","events_url":"https://api.github.com/repos/facebook/regenerator/issues/165/events","html_url":"https://github.com/facebook/regenerator/issues/165","id":54264405,"number":165,"title":"Runtime is not strict mode compliant","user":{"login":"appden","id":70904,"avatar_url":"https://avatars.githubusercontent.com/u/70904?v=3","gravatar_id":"","url":"https://api.github.com/users/appden","html_url":"https://github.com/appden","followers_url":"https://api.github.com/users/appden/followers","following_url":"https://api.github.com/users/appden/following{/other_user}","gists_url":"https://api.github.com/users/appden/gists{/gist_id}","starred_url":"https://api.github.com/users/appden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appden/subscriptions","organizations_url":"https://api.github.com/users/appden/orgs","repos_url":"https://api.github.com/users/appden/repos","events_url":"https://api.github.com/users/appden/events{/privacy}","received_events_url":"https://api.github.com/users/appden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-13T23:34:24Z","updated_at":"2015-01-13T23:37:59Z","closed_at":null,"body":"To reproduce: `node --use_strict regenerator/runtime.js`. This is a problem when compiling with `6to5`, as it will automatically include the strict header.\r\n\r\n###### Error Output\r\n```\r\nregenerator/runtime.js:318\r\n        function next() {\r\n        ^^^^^^^^\r\nSyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.\r\n    at Module._compile (module.js:439:25)\r\n    at Object.Module._extensions..js (module.js:474:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:312:12)\r\n    at Function.Module.runMain (module.js:497:10)\r\n    at startup (node.js:119:16)\r\n    at node.js:929:3\r\n```\r\n\r\n###### Minor Performance Opportunity?\r\nWhile on this topic, shouldn't the runtime include the `\"use strict\"` header so that it can take advantage of performance optimizations that v8 and other engines likely provide?\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/regenerator/issues/comments/69843686","html_url":"https://github.com/facebook/regenerator/issues/165#issuecomment-69843686","issue_url":"https://api.github.com/repos/facebook/regenerator/issues/165","id":69843686,"user":{"login":"appden","id":70904,"avatar_url":"https://avatars.githubusercontent.com/u/70904?v=3","gravatar_id":"","url":"https://api.github.com/users/appden","html_url":"https://github.com/appden","followers_url":"https://api.github.com/users/appden/followers","following_url":"https://api.github.com/users/appden/following{/other_user}","gists_url":"https://api.github.com/users/appden/gists{/gist_id}","starred_url":"https://api.github.com/users/appden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appden/subscriptions","organizations_url":"https://api.github.com/users/appden/orgs","repos_url":"https://api.github.com/users/appden/repos","events_url":"https://api.github.com/users/appden/events{/privacy}","received_events_url":"https://api.github.com/users/appden/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T23:37:59Z","updated_at":"2015-01-13T23:37:59Z","body":"@sebmck This is not the default behavior, but happened as a result of my crazy build configuration to get my project packaged up correctly as a self-contained library. So yes, most users won't encounter this particular issue with 6to5."}}