Socket
Socket
Sign inDemoInstall

ini

Package Overview
Dependencies
0
Maintainers
7
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

lib/ini.js

33

package.json
{
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"author": "GitHub Inc.",
"name": "ini",
"description": "An ini encoder/decoder for node",
"version": "2.0.0",
"version": "3.0.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
"url": "https://github.com/npm/ini.git"
},
"main": "ini.js",
"main": "lib/ini.js",
"scripts": {
"eslint": "eslint",
"lint": "npm run eslint -- ini.js test/*.js",
"lint": "eslint \"**/*.js\"",
"lintfix": "npm run lint -- --fix",
"test": "tap",
"snap": "tap",
"posttest": "npm run lint",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags"
"prepublishOnly": "git push origin --follow-tags",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force"
},
"devDependencies": {
"eslint": "^7.9.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"tap": "14"
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.2.2",
"tap": "^16.0.1"
},
"license": "ISC",
"files": [
"ini.js"
"bin/",
"lib/"
],
"engines": {
"node": ">=10"
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.2.2"
}
}

@@ -9,3 +9,3 @@ An ini format parser and serializer for node.

Consider an ini-file `config.ini` that looks like this:
```ini
; this comment is being ignored

@@ -24,5 +24,7 @@ scope = global

array[] = third value
```
You can read, manipulate and write the ini-file like so:
```js
var fs = require('fs')

@@ -40,2 +42,3 @@ , ini = require('ini')

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

@@ -45,2 +48,3 @@ This will result in a file called `config_modified.ini` being written

```ini
[section]

@@ -58,4 +62,4 @@ scope=local

array[]=fourth value
```
## API

@@ -99,3 +103,5 @@

```js
ini.safe('"unsafe string"')
```

@@ -102,0 +108,0 @@ would result in

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc