MCPcopy Index your code
hub / github.com/Keyang/node-csvtojson / parseBool

Function parseBool

bin/csvtojson.js:125–134  ·  view source on GitHub ↗
(str, optName)

Source from the content-addressed store, hash-verified

123 }
124
125 function parseBool(str, optName) {
126 str = str.toLowerCase();
127 if (str === "true" || str === "y") {
128 return true;
129 } else if (str === "false" || str === "n") {
130 return false;
131 }
132 console.log("Unknown boolean value %s for parameter %s.", str, optName);
133 _showHelp(1);
134 }
135 process.argv.slice(2).forEach(function (item) {
136 if (item.indexOf("--") > -1) {
137 var itemArr = item.split("=");

Callers 1

commandParserFunction · 0.85

Calls 1

_showHelpFunction · 0.85

Tested by

no test coverage detected