MCPcopy Create free account
hub / github.com/Effect-TS/effect / asBooleanLiteral

Function asBooleanLiteral

packages/effect/src/unstable/cli/internal/parser.ts:410–413  ·  view source on GitHub ↗
(token: Token | undefined)

Source from the content-addressed store, hash-verified

408 * Recognizes: true/false, yes/no, on/off, 1/0
409 */
410const asBooleanLiteral = (token: Token | undefined): string | undefined =>
411 token?._tag === "Value" && (Primitive.isTrueValue(token.value) || Primitive.isFalseValue(token.value))
412 ? token.value
413 : undefined
414
415/* ========================================================================== */
416/* Flag Value Consumption */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected