parse-ini

1.0.6 • Public • Published

Easy and robust ini file parser for node.

Usage description

Given file.ini:

; file.ini
variable1 = value1
[MySectionName]
lastUsed=3

You can acces these ini file variables like this:

var parser = require('parse-ini');
var iniObj = parser.parse('file.ini');
console.log(iniObj.variable1);
console.log(iniObj.MySectionName.lastUsed);

Features

  • Variable key and value can contain nearly ANY character incl. whitespace
  • Variables can be defined in sections
  • Variables without section are available directly on parsed object as property
  • Line comments starting with ; are possible

Package Sidebar

Install

npm i parse-ini

Weekly Downloads

121

Version

1.0.6

License

MIT

Last publish

Collaborators

  • pein-consulting.de