MCPcopy Index your code
hub / github.com/microsoft/SandDance / valueToBoolean

Function valueToBoolean

packages/search-expression/src/exec.ts:7–17  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

5import { Search, SearchExpression, SearchExpressionGroup } from './types';
6
7function valueToBoolean(value: any) {
8 if (typeof value === 'string') {
9 switch (value.toLowerCase()) {
10 case 'true':
11 return true;
12 case 'false':
13 return false;
14 }
15 }
16 return !!value;
17}
18
19function valueToString(value: any) {
20 if (value == null) {

Callers 2

constructorMethod · 0.70
runExpressionOnColumnMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected