ern-api-gen
Version:
Electrode Native API generator
23 lines • 516 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function parseBoolean(str) {
if (str == null) {
return false;
}
if (str === true || str === false) {
return str;
}
const cstr = ('' + str).toLowerCase();
if (cstr === 'true') {
return true;
}
if (cstr === 'false') {
return false;
}
return !!str;
}
exports.parseBoolean = parseBoolean;
exports.default = {
parseBoolean,
};
//# sourceMappingURL=BooleanHelper.js.map