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.
52 lines (49 loc) • 1.46 kB
JavaScript
;
// src/index.ts
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setTabSize = exports.getTabSize = exports.parseFile = exports.parse = void 0;
/*
This file is a pure barrel file.
https://github.com/YINI-lang/yini-parser-typescript/blob/main/docs/Project-Setup.md
Run the code with the following command:
npm start
or
npm run start:dev
or
npm run start:dev:debug
/END
*/
const YINI_1 = __importDefault(require("./YINI"));
/**
* Main entry point for the YINI parser.
*
* Provides static methods for parsing YINI configuration files and strings.
*
* @example Parse inline content
* ```ts
* import YINI from 'yini-parser'
*
* const config = YINI.parse(`
* ^ App
* name = 'Demo'
* version = "1.0.0"
* `)
* ```
*
* @example Parse from a file
* ```ts
* import YINI from 'yini-parser'
*
* const config = YINI.parseFile('./config/app.yini')
* ```
*/
// export { default as YINI } from './YINI' // NOTE: This line fail to export correctly!
exports.default = YINI_1.default; // Public package API.
exports.parse = YINI_1.default.parse;
exports.parseFile = YINI_1.default.parseFile;
exports.getTabSize = YINI_1.default.getTabSize;
exports.setTabSize = YINI_1.default.setTabSize;
//# sourceMappingURL=index.js.map