Skip to content

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

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

3 participants