To find the smallest value in a map, you can convert the map to an array using the spread operator, and then use the Math.min() function to find the smallest value. Here's an example:
index.tsx252 chars12 lines
Alternatively, you can use the Array.from() method to create an array from the map and then use the Array.prototype.sort() method to sort the values in ascending order, and then return the first element of the sorted array:
index.tsx236 chars12 lines
gistlibby LogSnag