4.0.0 • Published 1 year ago

read-ini-file v4.0.0

Weekly downloads
635
License
MIT
Repository
github
Last release
1 year ago

read-ini-file

Read and parse an ini file

npm version

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

License

MIT © Zoltan Kochan