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

parse-ini-string

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-ini-string - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

build/cjs/src/__tests__/indexTest.js

19

build/cjs/src/index.js

@@ -19,7 +19,8 @@ "use strict";

var bAndE = s.charAt(0) + '' + s.slice(-1);
return bAndE === '""' || bAndE === "''";
var bAndE2 = s.charAt(0) + '' + s.slice(-2);
return bAndE === '""' || bAndE === "''" || bAndE2 === '"";' || bAndE2 === "'';";
};
var stripQuote = function stripQuote(s) {
return s.replace(stripQuoteReg, '"').substring(1, s.length - 1);
return s.replace(stripQuoteReg, '"').substring(1, s.length - (s.slice(-1) === ';' ? 2 : 1));
};

@@ -34,7 +35,3 @@

if (n.charAt(0) === '"') {
return true;
} else {
return false;
}
return n.charAt(0) === '"' ? true : false;
};

@@ -79,6 +76,12 @@

} else {
if (line.trim().slice(-1) === '"') {
var lineTrim = line.trim();
if (lineTrim.slice(-1) === '"' || lineTrim.slice(-2) === '";') {
isEnd = true;
}
if (!isEnd) {
value += "\n";
}
value += line;

@@ -85,0 +88,0 @@ }

@@ -13,7 +13,8 @@ var commentReg = /^\s*[;]/;

var bAndE = s.charAt(0) + '' + s.slice(-1);
return bAndE === '""' || bAndE === "''";
var bAndE2 = s.charAt(0) + '' + s.slice(-2);
return bAndE === '""' || bAndE === "''" || bAndE2 === '"";' || bAndE2 === "'';";
};
var stripQuote = function stripQuote(s) {
return s.replace(stripQuoteReg, '"').substring(1, s.length - 1);
return s.replace(stripQuoteReg, '"').substring(1, s.length - (s.slice(-1) === ';' ? 2 : 1));
};

@@ -28,7 +29,3 @@

if (n.charAt(0) === '"') {
return true;
} else {
return false;
}
return n.charAt(0) === '"' ? true : false;
};

@@ -73,6 +70,12 @@

} else {
if (line.trim().slice(-1) === '"') {
var lineTrim = line.trim();
if (lineTrim.slice(-1) === '"' || lineTrim.slice(-2) === '";') {
isEnd = true;
}
if (!isEnd) {
value += "\n";
}
value += line;

@@ -79,0 +82,0 @@ }

{
"name": "parse-ini-string",
"version": "0.0.6",
"description": "PHP like parse-ini-string, support multi line",
"version": "0.0.7",
"description": "PHP parse-ini-string like library, support multi line",
"repository": "react-atomic/react-atomic-organism",

@@ -24,5 +24,4 @@ "main": "./build/cjs/src/index.js",

"build:es": "BABEL_ENV=es babel src -d build/es/src --root-mode upward",
"build:test": "BABEL_ENV=build babel tests -d build/tests --root-mode upward",
"prepublishOnly": "npm run test && npm run build",
"test": "npm run build && npm run build:test && mocha 'build/tests/**/*.js'"
"test": "npm run build && mocha 'build/cjs/**/__tests__/*.js'",
"prepublishOnly": "npm run test && npm run build"
},

@@ -29,0 +28,0 @@ "files": [

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