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

Support Douglas Crockford's Base32 and add option to split result #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

feliperaul
Copy link

Reading https://sudhir.io/uuids-ulids, I found it interesting to support Douglas Crockford's Base32.

The default is still the gem's original DEFAULT_BASE62, but it's easy for the user invoke Douglas's alphabet by either passing it as an argument (like ShortUUID.shorten(string, ShortUUID::DOUGLAS_CROCKFORD_BASE32) or set the new default in an Rails initializer for instance.

I also froze the '-' string and added the support for splitting the result string (makes it even easier to say it on the phone).

Reading https://sudhir.io/uuids-ulids, I found it interesting to support Douglas Crockford's Base32.

The default is still the gem's original `DEFAULT_BASE62`, but it's easy for the user invoke Douglas's alphabet by either passing it as an argument (like ShortUUID.shorten(string, ShortUUID::DOUGLAS_CROCKFORD_BASE32) or set the new default in an Rails initializer for instance.

I also froze the '-' string and added the support for splitting the result string (makes it even easier to say it on the phone).
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

Successfully merging this pull request may close these issues.

1 participant