Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix generator function clean #188

Merged
merged 1 commit into from
Sep 18, 2017
Merged

fix generator function clean #188

merged 1 commit into from
Sep 18, 2017

Conversation

APshenkin
Copy link
Contributor

@APshenkin APshenkin mentioned this pull request Sep 15, 2017
@APshenkin
Copy link
Contributor Author

@adamgruber It would be great if you will be able to publish npm with this change as soon as possible :)

Copy link
Owner

@adamgruber adamgruber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. If you make one small change and squash your commits I'll merge it.

src/utils.js Outdated
@@ -67,7 +67,7 @@ function removeAllPropsFromObjExcept(obj, propsToKeep) {
function cleanCode(str) {
str = str
.replace(/\r\n?|[\n\u2028\u2029]/g, '\n').replace(/^\uFEFF/, '')
.replace(/^function\s*\(.*\)\s*{|\(.*\)\s*=>\s*{?/, '')
.replace(/^function(\*?)\s*\(.*\)\s*{|\(.*\)\s*=>\s*{?/, '')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to put the \*? inside parens.

@APshenkin
Copy link
Contributor Author

@adamgruber done :)

@adamgruber adamgruber merged commit 6265395 into adamgruber:master Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants