(limit)
| 2 | import { getTussTerms, searchTuss } from '@/services/tuss'; |
| 3 | |
| 4 | function parseLimit(limit) { |
| 5 | if (typeof limit !== 'string') return undefined; |
| 6 | const n = Number.parseInt(limit, 10); |
| 7 | if (Number.isNaN(n) || n <= 0) return undefined; |
| 8 | return n; |
| 9 | } |
| 10 | |
| 11 | function parseOffset(offset) { |
| 12 | if (typeof offset !== 'string') return 0; |