Programming Tips 💡
51.6K subscribers
67 photos
10 videos
30 files
354 links
Programming & AI:
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles

🇳🇱 Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
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