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

Enhanced object literals don't have arrows #51

Merged
merged 3 commits into from Aug 20, 2019
Merged

Conversation

jowenjowen
Copy link
Contributor

Fixes a bug in serializeFunc. I added several unit tests until I could replicate the behavior. I think the extra unit tests are useful, but feel free to delete or alter any of them

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@jowenjowen
Copy link
Contributor Author

If you prefer a single commit, I can rework things

index.js Outdated
@@ -12,6 +12,7 @@ var PLACE_HOLDER_REGEXP = new RegExp('"@__(F|R|D|M|S)-' + UID + '-(\\d+)__@"', '

var IS_NATIVE_CODE_REGEXP = /\{\s*\[native code\]\s*\}/g;
var IS_PURE_FUNCTION = /function.*?\(/;
var IS_ARROW_FUNCTION = /.+?=>.+?/;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you use +? not *?? I prefer *? like the above line if you don't have any reasons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! Yes, *? is much better. Can you make the change or do you want me to do it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make the change into your branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@okuryu
Copy link
Collaborator

okuryu commented Aug 20, 2019

Thanks!

@okuryu okuryu merged commit cc2a309 into yahoo:master Aug 20, 2019
@okuryu
Copy link
Collaborator

okuryu commented Aug 20, 2019

published serialize-javascript@1.8.0. Thanks!

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.

None yet

3 participants