@ende/ini
ende add jsr:@ende/iniVersion 2026.10.15 on JSR.
parse and stringify for handling
INI encoded data, such as the
Desktop Entry specification.
import { parse, stringify } from "@ende/ini";
import { assertEquals } from "@ende/assert";
const text = `Global Key=Some data here
[Section #1]
Section Value=42
Section Date=1977-05-25`;
const parsed = parse(text);
assertEquals(parse(text), {
"Global Key": "Some data here",
"Section #1": {
"Section Value": 42,
"Section Date": "1977-05-25",
},
});
assertEquals(stringify(parsed), text);
Modules
Exports
parse— Parse an INI config string into an object.ParseOptions— Options for parse.ReplacerFunction— Function for replacing JavaScript values with INI string values.ReviverFunction— Function for replacing INI values with JavaScript values.stringify— Compile an object into an INI config string. Provide formatting options to modify the output.StringifyOptions— Options for stringify.