jonschlinkert / randomatic

Easily generate random strings like passwords, with simple options for specifying a length and for using patterns of numeric, alpha-numeric, alphabetical, special or custom characters. (the original "generate-password")
https://github.com/jonschlinkert
MIT License
183 stars 25 forks source link

Fix Issue #18 : Exclude not working #19

Closed ywpark1 closed 5 years ago

ywpark1 commented 5 years ago

The issue is that if exclude option has right square bracket, the regular expression pattern breaks, and it does not exclude any characters user input.

I added few lines of code to handle right square bracket. I also added two test cases when exclude option has right square bracket character.

Let me know if I need to adjust the code. Thanks.

ywpark1 commented 5 years ago

@doowb Let me know if there are other issues based on my PR!

doowb commented 5 years ago

@ywpark1 thanks for the PR! LGTM. Sorry for the delay.