MCPcopy Index your code
hub / github.com/omkarcloud/botasaurus / parseBoolean

Function parseBoolean

botasaurus-controls/src/index.ts:412–424  ·  view source on GitHub ↗
(value:any)

Source from the content-addressed store, hash-verified

410}
411
412const parseBoolean = (value:any) => {
413 if (typeof value === 'string') {
414
415 const normalizedValue = value.trim().toLowerCase();
416 if (negativeValues.has(normalizedValue)) {
417 return false;
418 }
419 if (affirmativeValues.has(normalizedValue)) {
420 return true;
421 }
422 }
423 return null
424}
425const parseNumber = (value:any)=>{
426 if (typeof value === 'string') {
427 const parsed = parseInt(value, 10);

Callers

nothing calls this directly

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected