Skip to content

Replace shortid to nanoid #58

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

Merged
merged 1 commit into from
Oct 31, 2017
Merged

Replace shortid to nanoid #58

merged 1 commit into from
Oct 31, 2017

Conversation

ai
Copy link
Contributor

@ai ai commented Oct 31, 2017

Hi. Thanks for an awesome project. I found the way how to make it a little better. By replacing unique ID generator from shortid to nanoid.

  1. shortid is not maintained anymore (and issue tracker has many important issues). I tried to took maintenance, but found that I can’t fix shortid with keeping API.
  2. nanoid is just 179 bytes. shortid is 2 times bigger (about 0.5 KB).
  3. nanoid is 10x times faster than shortid.

@jakezatecky I kept old ID size, everything will be the same for the user. I also run npm run example (not sure that I should update examples too).

@jakezatecky
Copy link
Owner

Thank you for providing a replacement.

@jakezatecky jakezatecky merged commit 1109faf into jakezatecky:master Oct 31, 2017
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