Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nodecraft/ini

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodecraft/ini - npm Package Compare versions

Comparing version 2.2.2 to 2.3.0

4

ini.js

@@ -19,2 +19,3 @@ 'use strict';

inlineArrays: false,
allowEmptySection: false,
};

@@ -47,3 +48,3 @@ }else{

if(options.section && out.length > 0){
if((options.section && out.length > 0) || (children.length === 0 && options.allowEmptySection)){
out = '[' + safe(options.section, null, options) + ']' + eol + out;

@@ -60,2 +61,3 @@ }

forceStringifyKeys: options.forceStringifyKeys,
allowEmptySection: options.allowEmptySection,
});

@@ -62,0 +64,0 @@ if(out.length > 0 && child.length > 0){

{
"name": "@nodecraft/ini",
"version": "2.2.2",
"version": "2.3.0",
"description": "An ini encoder/decoder for node",

@@ -5,0 +5,0 @@ "repository": {

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

## New `allowEmptySection` option
If you want to allow empty sections, you can set this option to `true`.
```ini
[section]
```
Previously, this would omit the section entirely on encode. Now, it will be included in the output.
## Usage

@@ -125,2 +132,3 @@

find that it's more human-readable and pretty with the whitespace.
* `allowEmptySection` Whether to allow empty sections. Defaults to `false`.

@@ -127,0 +135,0 @@ For backwards compatibility reasons, if a `string` options is passed

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc