balazsbotond / urlcat

A URL builder library for JavaScript.
https://urlcat.org
MIT License
1.82k stars 57 forks source link

Restrict the allowed types of path parameters #9 #12

Closed harshilparmar closed 4 years ago

harshilparmar commented 4 years ago

Summary

I have made pr for #9 .Which will restrict user to pass not allowed value to package function.

Details

balazsbotond commented 4 years ago

The code looks good to me! Looking forward to the test cases.

harshilparmar commented 4 years ago

The code looks good to me! Looking forward to the test cases.

Bro,For which types I have to write test cases? only for allowedTypes?

balazsbotond commented 4 years ago

For allowed types -> the path should be rendered For symbol, array and object -> a TypeError should be thrown

Null and undefined are removed before the path call so no tests are needed for those.

BigInt isn't available in most environments so I'd skip testing it.

harshilparmar commented 4 years ago

@balazsbotond Done 🤗 ,Can you please check !!

harshilparmar commented 4 years ago

@balazsbotond I have made this pr for issue #9,and I will make another pr for #13.

balazsbotond commented 4 years ago

Yes, you're right, this is #12

harshilparmar commented 4 years ago

@balazsbotond Thanks!! Can I give a suggestion ? How about making GitHub organization for this project and future ones.