https://github.com/marihachi/enhanced-aid
A time-sortable, ultra-simple identifier
https://github.com/marihachi/enhanced-aid
eaid general-purpose identification implementation simple specification
Last synced: 8 months ago
JSON representation
A time-sortable, ultra-simple identifier
- Host: GitHub
- URL: https://github.com/marihachi/enhanced-aid
- Owner: marihachi
- License: mit
- Created: 2019-04-13T15:48:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-25T10:41:16.000Z (almost 6 years ago)
- Last Synced: 2024-10-11T20:07:29.879Z (about 1 year ago)
- Topics: eaid, general-purpose, identification, implementation, simple, specification
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/eaid
- Size: 10.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# enhanced-aid
A time-sortable, ultra-simple identifier.
Inspired by syuilo's AID.
## Installation
```
npm i eaid
```
## Specification
### Description
The format of the enhanced AID consists of timestamp part and random part.
The enhanced AID have some variations of specifications.
```
+--------------------+--------------------+
| timestamp part | random part |
+--------------------+--------------------+
```
#### timestamp part
The timestamp part is base36 string made from unixtime in milliseconds.
It must have 9 charactors in the all specifications.
#### random part
The random part is base36 string made from random value.
It must be an appropriate length of string for the target Specification(e.g. EAID12, EAID24).
### EAID12
- timestamp part (9 characters)
- random part (3 characters)
### EAID16
- timestamp part (9 characters)
- random part (7 characters)
### EAID24
- timestamp part (9 characters)
- random part (15 characters)
### EAID32
- timestamp part (9 characters)
- random part (23 characters)
## License
MIT Licensed