Back to packages list

Vals using hashids

Description from the NPM package:
Generate YouTube-like ids from numbers. Use Hashids when you do not want to expose your database ids to the user.
kiven avatar
// Forked from @tmcw.short
tmcw avatar
Short URLs A URL shortener in Val Town! This turns URLs into strings like Which, well - it's not that short 🤣 but it's a start! It's pretty simple! In this case the storage is a private val because it contains some URLs. Part of the magic here is the venerable hashids module, which produces non-sequential string identifiers from an underlying serial numeric ID. So instead of huge UUIDs or fixed-length IDs like nanoid would generate, this generates short IDs, at least initially - like the example above, which is just "JK".