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

checkTypes: "natives" should be "primitives" (see notes below) #165

Open
gajus opened this issue Oct 1, 2015 · 3 comments
Open

checkTypes: "natives" should be "primitives" (see notes below) #165

gajus opened this issue Oct 1, 2015 · 3 comments

Comments

@gajus
Copy link

gajus commented Oct 1, 2015

typeof true
"boolean"

OK

typeof 1
"number"

OK

typeof 'foo'
"string"

OK

typeof {}
"object"

NOT OK

[].constructor.name
"Array"

OK

new Date().constructor.name
"Date"

OK

/test/.constructor.name
"RegExp"

OK

@qfox
Copy link
Member

qfox commented Oct 1, 2015

Well, but:

({}).constructor.name
"Object"

("").constructor.name
"String"

@gajus
Copy link
Author

gajus commented Oct 1, 2015

For some reason I assumed that plain object does not have .constructor.name.

@gajus gajus closed this as completed Oct 1, 2015
@qfox qfox added the question label Oct 1, 2015
@qfox
Copy link
Member

qfox commented Oct 1, 2015

@gajus Just noticed that natives should be primitives: https://developer.mozilla.org/en-US/docs/Glossary/Primitive
Oopsie!

@gajus gajus reopened this Oct 1, 2015
@qfox qfox changed the title "object" must be lowercase in the strictNativeCase checkTypes: "natives" should be "primitives" (see notes below) Oct 1, 2015
@qfox qfox modified the milestone: v1.3.0 Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants