MCPcopy Index your code
hub / github.com/cameri/nostream / parseOlderThanDays

Function parseOlderThanDays

src/clean-db.ts:54–65  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

52}
53
54const parseOlderThanDays = (value: string): number => {
55 if (!/^\d+$/.test(value)) {
56 throw new Error('--older-than must be a positive integer')
57 }
58
59 const days = Number(value)
60 if (!Number.isSafeInteger(days) || days <= 0) {
61 throw new Error('--older-than must be a positive integer')
62 }
63
64 return days
65}
66
67const parseKinds = (value: string): number[] => {
68 const parts = value

Callers 1

parseCleanDbOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected