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: class detection #53

Merged
merged 2 commits into from
May 6, 2020
Merged

fix: class detection #53

merged 2 commits into from
May 6, 2020

Conversation

aaarichter
Copy link

  • fix: class detection
  • chore: update packages

Comment on lines +60 to +63
return (
Object.prototype.toString.call(obj).match(/^\[object\s(.*)]$/)[1] ===
buildInType
);

Choose a reason for hiding this comment

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

i tried this in the chrome inspector and noticed that it adds to the is object each of the types, but for null and undefined they are lowercased, whereas for all the other types, like Array and Boolean and Map etc, they are uppercased.

Copy link
Author

Choose a reason for hiding this comment

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

null and undefined are not handled by these. they have there own assertion

Copy link

@erothman-groupon erothman-groupon left a comment

Choose a reason for hiding this comment

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

👍

@aaarichter aaarichter merged commit d712af5 into master May 6, 2020
@aaarichter aaarichter deleted the fix-obj branch May 6, 2020 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants