typeid-js
typeid-ts
typeid-js | typeid-ts | |
---|---|---|
1 | 1 | |
230 | 35 | |
19.6% | - | |
5.9 | 7.4 | |
15 days ago | 7 months ago | |
TypeScript | TypeScript | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
typeid-js
-
Adding type safety to object IDs in TypeScript
If you want a type-prefixed UUIDv7 type, I can wholeheartedly recommend TypeID-JS: https://github.com/jetpack-io/typeid-js
Also available for a whole bunch of other languages: https://github.com/jetpack-io/typeid
UUIDv7 is UUIDv4-compatible (i.e. you can put a v7 UUID anywhere a v4 UUID would go, like in Postgres's UUID datatype) and is time-series sortable, so you don't lose that nice lil' benefit of auto-incrementing IDs.
And if you use something like TypeORM to define your entities, you can use a Transformer to save as plain UUIDv7 in the DB (so you can use UUID datatypes, not strings), but deal with them as type-prefixed strings everywhere else:
```
typeid-ts
What are some alternatives?
typeid - Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
resource-id - Developer-friendly k-sortable IDs
launchpad - From Code to Kubernetes in One Step.
typeid-sql - SQL implementation TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
saltpack - a modern crypto messaging format
spec - The canonical spec for ulid
uuid-base58 - Generate a RFC4122 compliant v4 UUID and return it encoded in base-58. This is great for creating unique IDs which only consume 22 characters of storage. Also provides base-58 encoding and decoding.
afid
brain - Swyx's second brain!
ksuid - K-Sortable Globally Unique IDs
python-ksuid - A pure-Python KSUID implementation
typeid-go - Go implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs