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

Adding Hebrew randomize #21

Open netroad opened 5 years ago

netroad commented 5 years ago

I use randomatic at work and i add locally to my project a option to randomize hebrew characters Do you interesting in something like that in your code?

doowb commented 5 years ago

Hi @netroad, thanks for opening an issue to discuss before submitting a PR. I like the idea, but I think using the chars option is a better way to use randomatic for this case. This lets anyone use any alphabet they'd like.

That being said, if you'd like to submit a PR to alphabet with changes to allow different alphabets and include Hebrew, that would be awesome!

Then if you wanted to submit an example showing how to use the alphabet library with randomatic that would be even better 😀

netroad commented 5 years ago

The thing is that Hebrew letters dont use upper and or lower case

netroad commented 5 years ago

Hebrew its a little tricky for working in this but i have an idea of hos to make it work If you interesting i can dm you and we can talk about that

doowb commented 5 years ago

If you interesting i can dm you and we can talk about that

I'm not familiar with Hebrew (but I'm happy to learn) so if you have ideas, please post them here. I'd rather keep the conversation open so anyone can contribute. Also, I might not be able to respond quickly right now, so someone else might be able to jump in.

netroad commented 5 years ago

Ok so the two main things about hebrew is 1) is writing from right to left 2)we have ends letters, basically some letter have a "second form" that is used in the end of words Now i think that maybe there will be a json document that include the line "left to right" and the value true or false and whenever the value is false it will whenever you call the rendomize function "break" the string and put it the other way and for the end letters, whenever you wil randomize them with other chars it will randomize it without the end letter and will put it at the end of the string