
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
ini-parser-encoder
Advanced tools
A helper to parse ini file for nodejs
npm install ini-parser-encoder
var parser = require('ini-parser-encoder');
// sync
var config = parser.parseFileSync(INI_FILE, sub_separator, process_section, file_encoding, return_number_as_string);
// async
var parser.parseFile(INI_FILE, function(err, data) {
if (err) {
//
} else {
//
}
}, sub_separator, process_section, file_encoding, return_number_as_string)
a.b.c = val will be parse as {a:{b:{c: val}}}, the default sub separator is . , you can change it by pass param subSeparator
By default, will process section [section] as object property, you can pass false to disable it.
if set returnNumberAsString to false, will return Number(value) if a line only contain number and point
var obj = {
hello: 'world',
arr: ['a', 'b', 'c'],
sectionA: {
itema: 'stringa',
itemb: true
}
}
var strIni = parser.encode(obj);
// save to file
hello = world ; inline comment
booltest = true
numbertest = 1
floattest = 2.22
floattesta = 0.333
notfloattest = .4444
; this is comment
[sectionA]
# # comment not recommend
itemarray[] = a
itemarray[] = b
itemarray[] = c
[sectionB]
# sub seperator test
itemobject.subobj.a = 1
itemobject.subobj.b.d = 2
itemobject.subobj.b.e = 2
[mysql]
database="mis"
username="rd"
password="ABCDD=="
host=100.0.0.2
port="3306"
charset= "utf8"
FAQs
A helper to parse,encode ini file for nodejs
The npm package ini-parser-encoder receives a total of 7 weekly downloads. As such, ini-parser-encoder popularity was classified as not popular.
We found that ini-parser-encoder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.