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

@nodecraft/ini

Package Overview
Dependencies
Maintainers
5
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 1.4.0 to 2.0.0

4

ini.js

@@ -76,2 +76,4 @@ 'use strict';

function decode(str, opt = {}){
const defaultValue = typeof opt.defaultValue !== 'undefined' ? opt.defaultValue : '';
const out = {};

@@ -94,3 +96,3 @@ let ref = out;

let key = unsafe(match[2]);
let value = match[3] ? unsafe(match[3]) : true;
let value = match[3] ? unsafe(match[3]) : defaultValue;
switch(value){

@@ -97,0 +99,0 @@ case 'true':

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

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

@@ -26,2 +26,10 @@ An ini format parser and serializer for node.

### New `defaultValue` option
An `defaultValue` option when decoding to use when encountering a key without a value.
```ini
key=
secondkey
```
Previously both keys would contain the value `true`, now both keys would contain whatever this option is set to, or an empty string if this option is not set. This is a breaking change, and will decode some inputs differently.
## Usage

@@ -28,0 +36,0 @@

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