Programming & AI Tips 💡
46K subscribers
67 photos
11 videos
30 files
385 links
Programming & AI:
Tips 💡
Articles 📕
AI & LLMs 👾
Design, Architecture, Principles ✅

🇳🇱 Contact: @MoienTajik
Download Telegram
Hashids 👾

Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers. 💎

It converts numbers like 347 into strings like “yr8”, or array of numbers like [27, 986] into “3kTMd”. 🌀

You can also decode those ids back. 🔙

Available in 🔥 :
• JavaScript
• .NET
• Java
• PHP
• Ruby
• Python
• Swift
• ...

🔸🔹🔸🔹

Usage example in JavaScript 🤙🏻 :

var hashids = new Hashids("this is my salt", 8, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");

var id = hashids.encode(1, 2, 3);
// Output : GlaHquq0

var numbers = hashids.decode(id);
// Output : [1, 2, 3]



https://t.me/pgimg/36

[ Website ] : http://hashids.org/

〰〰〰〰〰〰
#Encode #Hash
@ProgrammingTip