MCPcopy Create free account
hub / github.com/NaturalIntelligence/fast-xml-parser / parse

Method parse

src/v6/valueParsers/booleanParser.js:13–21  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

11 this.falseList = ["false"];
12 }
13 parse(val){
14 if (typeof val === 'string') {
15 //TODO: performance: don't convert
16 const temp = val.toLowerCase();
17 if(this.trueList.indexOf(temp) !== -1) return true;
18 else if(this.falseList.indexOf(temp) !== -1 ) return false;
19 }
20 return val;
21 }
22}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected