yini-parser
Version:
Readable configuration without YAML foot-guns or JSON noise. The official Node.js parser for YINI config format — An INI-inspired configuration format with clear nesting, explicit types, and predictable parsing.
14 lines • 477 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const print_1 = require("../utils/print");
/**
* Extract boolean literal.
*/
const parseBooleanLiteral = (text) => {
(0, print_1.debugPrint)('-> Entered parseBooleanLiteral(..)');
const txt = text.trim().toLowerCase();
const value = !!(txt === 'true' || txt === 'yes' || txt === 'on');
return value;
};
exports.default = parseBooleanLiteral;
//# sourceMappingURL=parseBoolean.js.map