# read-ini-file

> Read and parse an ini file

Latest version **5.0.0** (published 2026-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install read-ini-file
pnpm add read-ini-file
yarn add read-ini-file
bun add read-ini-file
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2026-03-11 |
| First published | 2017-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=22.13 |
| Dependencies | 2 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Zoltan Kochan |
| Maintainers | zkochan |
| Keywords | read, ini, parse, file, fs, graceful, load |

## Links

- npm: https://www.npmjs.com/package/read-ini-file
- Repository: https://github.com/zkochan/packages/tree/main/read-ini-file
- Homepage: https://github.com/zkochan/packages/tree/main/read-ini-file#readme#readme
- Issues: https://github.com/zkochan/packages/issues
- npm.io page: https://npm.io/package/read-ini-file

## Dependencies (2)

- [ini](https://npm.io/package/ini.md) ^6.0.0
- [strip-bom](https://npm.io/package/strip-bom.md) ^5.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 5.0.0 (latest) — 2026-03-11
- 3.1.0 (next) — 2021-02-11
- 3.0.0 (pnpm-temp) — 2020-03-26
- 4.0.0 — 2022-12-23
- 4.0.0-0 — 2022-12-23
- 3.0.1 — 2021-01-09
- 2.0.0 — 2018-11-29
- 1.0.0 — 2017-04-16

## README

# read-ini-file

> Read and parse an ini file

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/read-ini-file.svg)](https://www.npmjs.com/package/read-ini-file)
<!--/@-->

## Installation

```sh
pnpm add read-ini-file
```

## Usage

<!--@example('./example/index.js')-->
```js
'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](https://github.com/zkochan/write-ini-file) - Stringify and write ini to a file atomically
- [ini](https://github.com/npm/ini) - An ini parser/serializer in JavaScript

## License

[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)

---
_Source: https://npm.io/package/read-ini-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
