JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 119904
  • Score
    100M100P100Q163681F
  • License MIT

Read and parse an ini file

Package Exports

  • read-ini-file
  • read-ini-file/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (read-ini-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

  • write-ini-file - Stringify and write ini to a file atomically
  • ini - An ini parser/serializer in JavaScript

License

MIT © Zoltan Kochan