Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Latest commit

 

History

History
49 lines (32 loc) · 1.16 KB

README.md

File metadata and controls

49 lines (32 loc) · 1.16 KB

moved https://github.com/zkochan/packages/tree/master/read-ini-file

read-ini-file

Read and parse an ini file

npm version Build Status

Installation

npm i -S read-ini-file

Usage

'use strict'
const loadIniFile = 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

loadIniFile(filepath)

Returns a promise for the parsed ini.

loadIniFile.sync(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