(rows: readonly T[], options: AdminUsersListOptions)
| 273 | * set that appears only when a filter is present. |
| 274 | */ |
| 275 | const pageOf = <T>(rows: readonly T[], options: AdminUsersListOptions): readonly T[] => { |
| 276 | const offset = Math.max(Math.floor(options.offset ?? 0), 0); |
| 277 | if (options.limit === undefined) return rows.slice(offset); |
| 278 | return rows.slice(offset, offset + Math.max(Math.floor(options.limit), 1)); |
| 279 | }; |
| 280 | |
| 281 | /** |
| 282 | * The `?email=` read, as a KEYED lookup. |