// Takes a list of coordinate pairs (like the keys from a fetch block) and returns a dimension function dims(coords){ ext = [[Infinity, Infinity], [-Infinity, -Infinity]] for (let i=0; i ext[1][0]) ext[1][0] = coord[0]; if (coord[1] > ext[1][1]) ext[1][1] = coord[1]; } return ext; } module.exports = dims