yini-parser
Version:
Node.js parser for YINI — a clean, structured INI alternative with types, simple section nesting, comments, and strict mode.
13 lines (12 loc) • 393 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const print_1 = require("../utils/print");
/**
* Extract boolean literal.
*/
const parseBooleanLiteral = (txt) => {
(0, print_1.debugPrint)('-> Entered parseBooleanLiteral(..)');
const value = !!(txt === 'true' || txt === 'yes' || txt === 'on');
return value;
};
exports.default = parseBooleanLiteral;