MCPcopy Create free account
hub / github.com/denodrivers/postgres / decodeBoolean

Function decodeBoolean

query/decoders.ts:33–43  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

31}
32
33export function decodeBoolean(value: string): boolean {
34 const v = value.toLowerCase();
35 return (
36 v === "t" ||
37 v === "true" ||
38 v === "y" ||
39 v === "yes" ||
40 v === "on" ||
41 v === "1"
42 );
43}
44
45export function decodeBooleanArray(value: string) {
46 return parseArray(value, decodeBoolean);

Callers 2

decodeTextFunction · 0.90
decode_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected