selection-key
Convert an array of integers into a short (ish), unique, URL-friendly key, and back again.
Useful if you need a key to represent a unique selection from a set of items – make an array containing only the integer IDs of the selected items, and then get a unique reversable string representing that set.
Usage
var selectionKey = ; var maxId = 100;var selectedItems = 5 6 20 24 25 47 48 51 55 60 61 77 88 90 91 92 96; var key = ; // 'O02C000P40.40BY00000' var parsed = selectionKey; // array of original items (sorted)
Licence
MIT