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

[documentation] state all the possible types in Readme #101

Open
revelt opened this issue Jun 11, 2017 · 4 comments
Open

[documentation] state all the possible types in Readme #101

revelt opened this issue Jun 11, 2017 · 4 comments

Comments

@revelt
Copy link

revelt commented Jun 11, 2017

hi all,
This library introduces some types that don't exist in ES5 and I found it slightly annoying to do a guesswork, which type starts with capital letter and which does not.

I couldn't find the list of types in Chai documentation website. Even if it's there hidden somewhere, it would be nice to add the list of all types that this library produces in this library's README.

For example (with correct capitalisation):

  • string << lowercase
  • Object << uppercase
  • Function << uppercase
  • boolean << lowercase
  • ...

and so on..

What do you think?

@keithamus
Copy link
Member

Essentially everything that is a primitive value should have a lowercase name, and everything else should be title case. So the only lowercase types should be number, boolean, string, null, undefined. But I would be happy to see this documented in the readme, would you like to submit a PR?

@revelt
Copy link
Author

revelt commented Jun 12, 2017

Hi Keith, thank you for a quick response. You pretty much distilled it, if we mentioned those 5 and that the rest is title case, that could be it. If you have commit rights, maybe it would be quicker if you dropped it into readme?

@keithamus
Copy link
Member

I do have commit rights, but I would much rather see a healthy community where people have a chance to contribute in ways that they see meaningful - so please, if you would be so kind as to raise a PR documenting this how you feel it is important, that'd be awesome 💯

@revelt revelt closed this as completed Jun 14, 2017
@keithamus keithamus reopened this Jun 15, 2017
@bdcarr
Copy link

bdcarr commented May 27, 2019

Would be even better if the module contained a list of constants defining each type, so I could just do expect(result).to.be.a(TypeDetect.NUMBER). Never made a PR to a public repo before but I'll add this to my todo list!

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

No branches or pull requests

3 participants