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

Make it work across realms #14

Merged
merged 2 commits into from
Jun 14, 2022
Merged

Make it work across realms #14

merged 2 commits into from
Jun 14, 2022

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Jun 13, 2022

Fixes #11

This makes this library work across realms.

@@ -24,6 +25,10 @@ isPlainObject(new Object());
isPlainObject(Object.create(null));
//=> true

// This works across realms
isPlainObject(runInNewContext('({})'));
//=> true
Copy link
Owner

Choose a reason for hiding this comment

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

Can you update index.d.ts too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 👍

@ehmicky ehmicky requested a review from sindresorhus June 14, 2022 13:24
@sindresorhus sindresorhus merged commit b51c26a into sindresorhus:main Jun 14, 2022
@ehmicky ehmicky deleted the realms branch June 14, 2022 16:37
@ehmicky ehmicky mentioned this pull request Jun 14, 2022
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.

Does not work with cross-realm objects
2 participants