segmentio / ksuid

K-Sortable Globally Unique IDs
https://segment.com/blog/a-brief-history-of-the-uuid/
MIT License
4.82k stars 174 forks source link

What is the differences between Sync and Async? #63

Open vietaws opened 2 years ago

vietaws commented 2 years ago

Creation You can create a new instance synchronously:

const ksuidFromSync = KSUID.randomSync() Or asynchronously:

const ksuidFromAsync = await KSUID.random()

abraithwaite commented 2 years ago

Hi there @vietaws , I think you meant to post an issue to this repo instead: https://github.com/novemberborn/ksuid

But getting ahead of that: https://nodejs.dev/learn/modern-asynchronous-javascript-with-async-and-await