read-ini-file
v4.0.0
Published
Read and parse an ini file
Downloads
259,415
Maintainers
Readme
read-ini-file
Read and parse an ini file
Installation
pnpm add read-ini-file
Usage
'use strict'
const { readIniFile } = require('read-ini-file')
const path = require('path')
const fixture = path.join(__dirname, 'currencies.ini')
const currencies = loadIniFile.sync(fixture)
console.log(currencies)
//> { USA: 'USD', Ukraine: 'UAH', Hungary: 'HUF' }
API
readIniFile(filepath)
Returns a promise for the parsed ini.
readIniFileSync(filepath)
Returns the parsed ini.
Related
- write-ini-file - Stringify and write ini to a file atomically
- ini - An ini parser/serializer in JavaScript