diff --git a/public/index.html b/public/index.html index 3fb14ee..05878c3 100644 --- a/public/index.html +++ b/public/index.html @@ -115,6 +115,10 @@ console.error("Error getting documents: ", e); } } + + function uniqByKeepLast(a, key) { + return [...new Map(a.map(x => [key(x), x])).values()] + }