Modules@robinpath/ini

@robinpath/ini

0.1.0Public

Parse, stringify, read, and write INI configuration files

@robinpath/ini

Parse, stringify, read, and write INI configuration files

Category Functions Auth License

Why use this module?

The ini module lets you:

  • Parse an INI string to object
  • Convert object to INI string
  • Read and parse an INI file
  • Write object as INI to file
  • Get value by section and key from INI string

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/ini

Quick Start

No credentials needed — start using it right away:

ini.stringify $config

Available Functions

FunctionDescription
ini.parseParse an INI string to object
ini.stringifyConvert object to INI string
ini.parseFileRead and parse an INI file
ini.writeFileWrite object as INI to file
ini.getGet value by section and key from INI string
ini.setSet value by section and key, return updated INI
ini.getSectionsGet all section names
ini.getKeysGet all keys in a section
ini.removeSectionRemove a section from INI string
ini.removeKeyRemove a key from a section

Examples

Convert object to INI string

ini.stringify $config

Read and parse an INI file

ini.parseFile "config.ini"

Write object as INI to file

ini.writeFile "config.ini" $obj

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/ini";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  ini.stringify $config
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/ini
Version0.1.0
LicenseMIT
Unpacked Size4.2 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

utilities