You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,40 +42,40 @@ Simple encode & decode:
42
42
43
43
```javascript
44
44
constsqids=newSqids()
45
-
constid=sqids.encode([1, 2, 3]) // "8QRLaD"
45
+
constid=sqids.encode([1, 2, 3]) // "86Rf07"
46
46
constnumbers=sqids.decode(id) // [1, 2, 3]
47
47
```
48
48
49
49
> **Note**
50
50
> 🚧 Because of the algorithm's design, **multiple IDs can decode back into the same sequence of numbers**. If it's important to your design that IDs are canonical, you have to manually re-encode decoded numbers and check that the generated ID matches.
0 commit comments