The Ultimate QR Editor
Find the optimal encoding
permutation: use permute() to generatefn: function that receives qr and returns an object with 'score' valueopt:
capacity: number of top-scoring items to retainecl: ECL level (0-3)version: Version number (1-40)batch:
start: index to start atstride: amount to increment index bytelimit: number of items to iterate overloop: number to loop around (usually permutation.total)import { permute, search } from 'qrsart/search'
let results = search(
permute('url','https://qrs.art',{ protoclCaps: true }),
function priority(qr){
let count = 0
for(let [x,y] of qr.grid.tiles(1)){
count++
}
return { score: count }
},
{
capacity: 6,
ecl: 2,
version: 2
}
)