MCPcopy Create free account
hub / github.com/anomalyco/opencode / positiveInteger

Function positiveInteger

packages/opencode/src/effect/runtime-flags.ts:5–9  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

3
4const bool = (name: string) => Config.boolean(name).pipe(Config.withDefault(false))
5const positiveInteger = (name: string) =>
6 Config.number(name).pipe(
7 Config.map((value) => (Number.isInteger(value) && value > 0 ? value : undefined)),
8 Config.orElse(() => Config.succeed(undefined)),
9 )
10const experimental = bool("OPENCODE_EXPERIMENTAL")
11const enabledByExperimental = (name: string) =>
12 Config.all({ experimental, enabled: Config.boolean(name).pipe(Config.option) }).pipe(

Callers 1

ServiceClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected