js-id VS typeid

Compare js-id vs typeid and see what are their differences.

js-id

ID generation for JavaScript & TypeScript Applications (by MatrixAI)

typeid

Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs (by jetify-com)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com
featured
js-id typeid
3 15
10 2,744
- 6.7%
5.9 8.2
8 months ago 9 days ago
TypeScript Go
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

js-id

Posts with mentions or reviews of js-id. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-28.
  • Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
    19 projects | news.ycombinator.com | 28 Jun 2023
    We have a uuidv7 implementation that we've been using with rocksdb for over a year https://github.com/matrixai/js-id
  • Plan B for UUIDs: double AES-128
    4 projects | news.ycombinator.com | 5 Aug 2022
    We evaluated ULID but we wanted something that is future proof for our decentralised secret sharing system. So we implemented UUIDv7 in TypeScript called `IdSortable` https://github.com/MatrixAI/js-id

    It allows strict monotonic IDs when you provide it the previously generated ID. The resulting data structure is a Uint8Array making it easy to put into binary structures. Can also be used as a key inside any POJO record.

  • Lesser Known PostgreSQL Features
    7 projects | news.ycombinator.com | 9 Nov 2021
    I had reviewed existing UUIDv7 implementations and many were incorrect or had subtle timing bugs.

    We ended up implementing UUIDv7 in our ID generation library https://github.com/MatrixAI/js-id. And we have a number of tests ensuring that it is truly monotonic even across process restarts.

    See IdSortable.

typeid

Posts with mentions or reviews of typeid. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-11.
  • ULIDs and Primary Keys
    1 project | news.ycombinator.com | 12 Apr 2024
    I’ve seen this sort of design referred to as “typed IDs”: https://github.com/jetify-com/typeid

    Doesn’t use the crockford encoding, but does is another one that minimises confusables.

  • Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
    1 project | news.ycombinator.com | 12 Apr 2024
    1 project | /r/patient_hackernews | 28 Jun 2023
  • The UX of UUIDs
    10 projects | news.ycombinator.com | 11 Apr 2024
    https://github.com/uuid6/new-uuid-encoding-techniques-ietf-d...

    But there is always TypeID in the meantime which uses UUIDv7 under the hood: https://github.com/jetify-com/typeid

    Either way, I am in favor of prefixing and using alternative encodings, but it will need some time to figure out the best route. In the mean time, there are so many alternatives. TypeID, NanoID, ULID, etc. I even made my own quick one just for giggles: https://github.com/daegalus/snowflakes

  • Adding type safety to object IDs in TypeScript
    3 projects | news.ycombinator.com | 30 Jan 2024
    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:

    ```

  • You Don't Need UUID
    13 projects | news.ycombinator.com | 11 Sep 2023
    IMO, a good middleground is using schemes like TypeID[0], ulid[1], or KSUID[2] that provides a more compact and readable (base32) representation and provides better database locality (K-sortable).

    [0] https://github.com/jetpack-io/typeid

  • typeid: Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
    1 project | /r/SoftwareEngineering | 18 Jul 2023
    1 project | /r/softwarecrafters | 18 Jul 2023
  • Why do so many EF tutorials use GUIDs as primary key?
    1 project | /r/dotnet | 15 Jul 2023
    If you do consider a GUID, I recommend the TypeID library we recently open-sourced. It has typing as part of the id, and it's based on UUIDv7. We think it has a few benefits over other GUIDs, including: + Easier to debug because of the type information + Type-safety can be enforced + Thanks to UUIDv7 is has good locality properties when used as the primary key of a database (unlike a completely random GUID) + We have a dotnet implementation in C# available
  • How to create unique id for every todo in a todo list.
    1 project | /r/node | 1 Jul 2023
    If you’re open to a globally unique identifier like UUID, I’d recommend you check out TypeIDs which we recently open sourced https://github.com/jetpack-io/typeid. They are based on the UUIDv7 standard, but add type information (like what Stripe does in their APIs), and we have a TypeScript implementation available.

What are some alternatives?

When comparing js-id and typeid you can also consider the following projects:

ksuid - K-Sortable Globally Unique IDs

rust-ksuid - A pure-Rust KSUID implementation

typeid-go - Go implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs

typeid-ts - TypeID UUIDv7 implementation in Typescript (Lib and CLI)

tbls - tbls is a CI-Friendly tool for document a database, written in Go.

resource-id - Developer-friendly k-sortable IDs

typeid-sql - SQL implementation TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs

postgres-elasticsearch-fdw - Postgres to Elastic Search Foreign Data Wrapper

afid

snowid - A Decentralized, K-Ordered 128-bit Unique ID Generator library in C.