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

enhance POJO detection #7

Merged
merged 1 commit into from
Mar 27, 2018
Merged

enhance POJO detection #7

merged 1 commit into from
Mar 27, 2018

Conversation

Conduitry
Copy link
Contributor

@Conduitry Conduitry commented Mar 27, 2018

Mostly fixes #5. I'm pretty sure it's impossible to be 100% certain that something is a POJO from another realm, but this seems to be a reasonable approximation of that.

This also throws if any of the keys on the object are symbols.

It does not handle non-enumerable keys or things with non-default property descriptors.

@Rich-Harris Rich-Harris merged commit 4bd475e into Rich-Harris:master Mar 27, 2018
@Rich-Harris
Copy link
Owner

nice, this seems like a good common-sense solution, thanks. Released 1.0.3. Will open a separate issue for the non-enumerable thing

@Conduitry Conduitry deleted the pojo-detection branch March 27, 2018 22:27
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.

"Non-POJO" check is slightly naive
2 participants