Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
This package has been deprecated with the following message: Please update to ini >=1.3.6 to avoid a prototype pollution issue
Generated on Apr 2, 2024 via pnpm

ini 1.0.1

An ini encoder/decoder for node
Package summary
Share
4
issues
1
critical severity
license
1
3
high severity
vulnerability
2
meta
1
1
license
1
N/A
Package created
7 Aug 2011
Version published
13 Sep 2011
Maintainers
6
Total deps
1
Direct deps
0
License
UNKNOWN

Issues

4

1 critical severity issue

critical
Recommendation: Check the package code and files for license information
via: ini@1.0.1
Collapse
Expand

3 high severity issues

high
Recommendation: Upgrade to version 1.3.6 or later
via: ini@1.0.1
Recommendation: Upgrade to version 1.3.6 or later
via: ini@1.0.1
via: ini@1.0.1
Collapse
Expand

Licenses

N/A

N/A
1 Packages, Including:
ini@1.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ini 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ini do?

INI is a powerful npm package for Node.js, utilized as an INI encoder and decoder. INI files are simple text files with a basic structure used in Windows OS for configuration of software applications. The INI parser and serializer offered by this package comes in handy for dealing with this kind of text file. The package provides features to parse INI format text to a conveniently usable JavaScript object and serialize JavaScript objects back to INI format text. It treats sections as nested objects, and the items that appear before the first heading are saved directly onto the object.

How do you use ini?

Using INI for reading, manipulating, and writing an INI file in Node.js is pretty straightforward. Here's a simple JavaScript code usage example:

    var fs = require('fs')
      , ini = require('ini')

    var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))

    config.scope = 'local'
    config.database.database = 'use_another_database'
    config.paths.default.tmpdir = '/tmp'
    delete config.paths.default.datadir
    config.paths.default.array.push('fourth value')

    fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' }))

In this example, it first reads and decodes the INI file called 'config.ini' into a JavaScript object using fs.readFileSync()and ini.parse(). Then it modifies some properties of the JavaScript object. After making the changes, it encodes the object back into an INI-formatted string using ini.stringify() and writes this string into a new file named 'config_modified.ini' with fs.writeFileSync().

Where are the ini docs?

As outlined in the package's Readme, the official documentation for INI is available on its GitHub page (https://github.com/npm/ini). The documentation provides a comprehensive guide and explains how to leverage its API, including methods such as decode, encode, parse, stringify, safe, and unsafe. The API section of the documentation enumerates the purpose and usage of these functions, along with the details of their optional parameters.