Request for Plugin: Nano ID

In Maple - recipes | meal-planning | grocery - Showcase - Talk TW (tiddlywiki.org) a plugin called shortid has been used.

ShortId creates amazingly short non-sequential url-friendly unique ids. Perfect for url shorteners, MongoDB and Redis ids, and any other id users might see.

The source of shorid can be found in the GitHub

The author states that shortid is unsafe and instead nanoid is recommended.

NanoID is a tiny (130 bytes), secure, URL-friendly, unique string ID generator for JavaScript

Our JS knowledgeable fellows may create the nanoid plugin for TW.

Use cases

  • Create tiddler title using nano id
  • Create states like the one we use with qualify
1 Like

Creating unique titles will be possible.

but

Replacing the qualify-functionality will be not possible. Qualify creates a reproducible result between different renders. Per definition nanoid creates random numbers they should never be the same twice.

Just a remark

Hi Mario,
That’s true! It is not a replacement for qualify and cannot be used dynamically.
But getting a static uuid for a state tiddler or even creating a new tiddler are beneficial!