27 February 2023
- Kyle Chine Leismore https://kylechine.leismore.co
GNU Free Documentation License Version 1.3
-
This version: https://lmos.leismore.org/shortid-spec/v4-0-0/rep/README.md
-
Latest version: https://lmos.leismore.org/shortid-spec/latest/rep/README.md
-
Project Homepage: https://lmos.leismore.org/shortid-spec
Leismore ShortID is a universally unique identifier based on Nano ID (Sitnik [2017] 2021). This document describes its purpose, format, recommended comparison method, and other technical details.
Ideally, a universally unique identifier exposing to end-users or external applications via digital medias, should be:
- No collision in the near future
- Friendly for human readers
- URL friendly character set
- Short and fixed length
- Character set (
nolookalikes
from Nanoid-Dictionary (Lashmanov [2018] 2021) ):-
`346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz`
-
- Length: 20 characters
- Canonical syntax: XXXX-XXXX-XXXX-XXXX-XXXX
- Case-sensitive
The -
characters are used purely for the human readability reason. It must not be considered as a semantics part in Leismore ShortID. While doing ID comparison, it must be removed from the IDs.
When 1,000 IDs are being generated per second, in order to have a 1% probability of at least one collision, ~358 thousand years are needed, according to the calculation of Nano ID CC (Zhuravlёv n.d.)
- Sitnik, Andrey. (2017) 2021. Nano ID. JavaScript. https://github.com/ai/nanoid.
- Lashmanov, Stanislav. (2018) 2021. Nanoid-Dictionary. JavaScript. https://github.com/CyberAP/nanoid-dictionary.
- Zhuravlёv, Aleksandr. n.d. Nano ID CC. Web. Accessed October 19, 2021. https://zelark.github.io/nano-id-cc.