MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / positiveInt

Function positiveInt

projects/runtime-node/src/localFiles.ts:39–41  ·  view source on GitHub ↗
(value: unknown, fallback: number)

Source from the content-addressed store, hash-verified

37}
38
39function positiveInt(value: unknown, fallback: number): number {
40 return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback
41}
42
43async function entryFor(dir: string, name: string): Promise<PathEntry | null> {
44 const fullPath = path.join(dir, name)

Callers 4

describePathFunction · 0.85
readFileFunction · 0.85
fuzzySearchFunction · 0.85
searchContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected