Socket
Socket
Sign inDemoInstall

toml

Package Overview
Dependencies
0
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.6 to 3.0.0

10

lib/compiler.js

@@ -6,3 +6,3 @@ "use strict";

var currentPath = "";
var data = {};
var data = Object.create(null);
var context = data;

@@ -80,3 +80,3 @@ var arrayMode = false;

function reduceInlineTableNode(values) {
var obj = {};
var obj = Object.create(null);
for (var i = 0; i < values.length; i++) {

@@ -104,3 +104,3 @@ var val = values[i];

assignedPaths.push(quotedPath);
context = deepRef(data, path, {}, line, column);
context = deepRef(data, path, Object.create(null), line, column);
currentPath = path;

@@ -126,3 +126,3 @@ }

if (context instanceof Array) {
var newObj = {};
var newObj = Object.create(null);
context.push(newObj);

@@ -153,3 +153,3 @@ context = newObj;

} else {
ctx[key] = {};
ctx[key] = Object.create(null);
}

@@ -156,0 +156,0 @@ } else if (i !== keys.length - 1 && valueAssignments.indexOf(traversedPath) > -1) {

{
"name": "toml",
"version": "2.3.6",
"version": "3.0.0",
"description": "TOML parser for Node.js (parses TOML spec v0.4.0)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -587,1 +587,11 @@ var toml = require('../');

};
exports.testUsingConstructorAsKey = function(test) {
test.parsesToml("[empty]\n[emptier]\n[constructor]\nconstructor = 1\n[emptiest]", {
"empty": {},
"emptier": {},
"constructor": { "constructor": 1 },
"emptiest": {}
});
test.done();
};
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