MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / coerceBool

Function coerceBool

packages/internal/src/db/advisory-lock.ts:22–26  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

20 * or actual boolean values depending on configuration.
21 */
22export function coerceBool(value: unknown): boolean {
23 if (typeof value === 'boolean') return value
24 if (value === 't' || value === 'true' || value === 1) return true
25 return false
26}
27
28// Diagnostic logging helper with timestamp and process info
29function logLock(level: 'info' | 'error' | 'warn', message: string, data?: Record<string, unknown>): void {

Callers 2

admitFromQueueFunction · 0.90
tryAcquireAdvisoryLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected