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.
46 lines (45 loc) • 1.41 kB
TypeScript
import YINI from './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 YINI;
export declare const parse: typeof YINI.parse;
export declare const parseFile: typeof YINI.parseFile;
export declare const getTabSize: typeof YINI.getTabSize;
export declare const setTabSize: typeof YINI.setTabSize;
/**
* Public type exports for the YINI parser.
*
* These types define the shape of parse results, configuration options,
* and metadata returned by `YINI.parse(..)` and `YINI.parseFile(..)`.
*
* @remarks
* Import these directly from the main package entry:
*
* ```ts
* import type { YiniParseResult, ParseOptions, ResultMetadata } from 'yini-parser'
* ```
*
* @packageDocumentation
*/
export type { ParsedObject, AllUserOptions, YiniParseResult, OnDuplicateKey, DuplicateKeyPolicy, DocumentTerminatorRule, EmptyValueRule, FailLevelKey, PreferredFailLevel, BasicOptions, PrimaryUserParams, ParseOptions, IssuePayload, MetaSchemaVersion, OrderGuarantee, ResultMetadata, } from './types';