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.
27 lines • 826 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapFailLevelToBail = mapFailLevelToBail;
function mapFailLevelToBail(isStrict, failLevel) {
let bailLevel = '0-Ignore-Errors';
if (failLevel === 'auto') {
if (!isStrict)
bailLevel = '0-Ignore-Errors';
if (isStrict)
bailLevel = '1-Abort-on-Errors';
}
else {
switch (failLevel) {
case 'ignore-errors':
bailLevel = '0-Ignore-Errors';
break;
case 'errors':
bailLevel = '1-Abort-on-Errors';
break;
case 'warnings-and-errors':
bailLevel = '2-Abort-Even-on-Warnings';
break;
}
}
return bailLevel;
}
//# sourceMappingURL=failLevel.js.map