thebrain-uuid-slug
Encode TheBrain uuids to 22 characters slugs and decode slugs to uuids
This is useful to decode slugs from local thought url and create same url from BrainId and ThoughtId.
Install
npm install thebrain-uuid-slug
Usage
Create TheBrain local url
const uuidToSlug = const brainId = 'fd7bebf7-0ea0-40c9-b8c7-969e54c86136'const thoughtId = 'd527957d-d57b-4af5-bb68-d527fd7d7b3b' const localUrl = `brain://api.thebrain.com//` assert
Decode TheBrain local url slug to uuid
const slugToUuid = const slug = '9-t7_aMOyUC4x5aeVMhhNg' assert