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

Feature: Consistent Length Short Ids #46

Closed
wants to merge 1 commit into from
Closed

Feature: Consistent Length Short Ids #46

wants to merge 1 commit into from

Conversation

thadeucity
Copy link
Contributor

Implements a padding function when id is shorter than predicted.

Following the Issue #39

A function will calculate how long the Short ID will be with the provided alphabet and pad the result to match the predicted length.

I also implemented a test to check if the feature is working properly.

Implements a padding function when id is shorter than predicted
@papb
Copy link

papb commented Sep 5, 2020

Hello! Nice! Have you considered putting this behavior under an option flag (such as consistentLength) instead of forcing it? I think the package owner prefers an option. (I'd be happy with both approaches)

@thadeucity
Copy link
Contributor Author

For sure, you are right, it would be better with options. I will try to implement the feature

@thadeucity thadeucity closed this Sep 5, 2020
@thadeucity
Copy link
Contributor Author

Sent a better one on PullRequest #47

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.

2 participants