Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

HugeBrain16/iniparser-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iniparser-js

An iniparser.

Examples

an example of a valid .ini file

# an example of valid .ini file, and this is a valid comment
; this is also a valid comment

; no section options must be exists before any sections defined
config = default ; this is a valid option
no_value ; "no_value" value is null

[main] ; this is a valid section
; options inside "main" section
name = amogus
age = 42069

read .ini file

var fs = require("fs");
var iniparser = require("@hugebrain16/iniparser");

var content = fs.readFileSync("example.ini", "utf8");
const result = iniparser.parse(content);

console.log(result);