MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / booleanConverter

Function booleanConverter

packages/core/ui/core/view-base/utils.ts:3–9  ·  view source on GitHub ↗
(v: string | boolean)

Source from the content-addressed store, hash-verified

1// Utility functions for view-base and related modules
2
3export function booleanConverter(v: string | boolean): boolean {
4 if (typeof v === 'string') {
5 v = v.trim().toLowerCase();
6 return v === 'true' || v === '1';
7 }
8 return !!v;
9}

Callers 7

valueConverterFunction · 0.90
textWrapMethod · 0.90
textWrapMethod · 0.90
valueConverterFunction · 0.90
textWrapFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected