Filtered products for the landing

This commit is contained in:
Luis Alvarez
2020-10-19 13:49:02 -05:00
parent f4bc27666b
commit e5ee8caaec
2 changed files with 56 additions and 12 deletions

7
lib/range-map.ts Normal file
View File

@@ -0,0 +1,7 @@
export default function rangeMap(n: number, fn: (i: number) => any) {
const arr = []
while (n > arr.length) {
arr.push(fn(arr.length))
}
return arr
}