nanoid-postgres icon indicating copy to clipboard operation
nanoid-postgres copied to clipboard

Add ability to pass custom alphabet

Open mkaput opened this issue 3 years ago • 2 comments

Hi!

I did this change for my project. Thought may be nice to contribute 😃

mkaput avatar Jan 20 '22 09:01 mkaput

Hey! thanks for contributing, however there's a bit more to the custom alphabet implementation if you take a look at the original JS repo README https://github.com/ai/nanoid#security and source https://github.com/ai/nanoid/blob/main/index.js#L31

I believe it's to do with the distribution of characters in the custom alphabet, but not totally sure, and haven't had time to dive into it, hence leaving it out, think you'd be able to improve it?

Jakeii avatar Jan 20 '22 11:01 Jakeii

Thanks for pointing this out. I can take a deeper look into this, though the time frame is unbounded. So in case someone else wants to, feel free.

mkaput avatar Jan 20 '22 12:01 mkaput