Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ploon

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ploon - npm Package Compare versions

Comparing version
1.0.5
to
1.0.6
+10
-4
dist/index.js

@@ -95,2 +95,3 @@ import { XMLBuilder, XMLParser, XMLValidator } from "fast-xml-parser";

* If data is an array, name it 'root'
* If data is an object with no arrays, wrap it as a single-element array
*/

@@ -107,6 +108,10 @@ function findRootArray$1(data) {

};
return {
name: "data",
array: [data]
};
}
return {
name: "root",
array: null
name: "data",
array: [data]
};

@@ -489,3 +494,2 @@ }

const rootArray = findRootArray(data);
if (!rootArray) throw new Error("Data must contain at least one array");
const records = encodeArray(rootArray, new PathWriter(config), config);

@@ -498,2 +502,3 @@ const { recordSeparator } = config;

* Find root array in data
* Auto-wraps single objects/primitives into arrays
*/

@@ -504,4 +509,5 @@ function findRootArray(data) {

for (const value of Object.values(data)) if (isJsonArray(value)) return value;
return [data];
}
return null;
return [data];
}

@@ -508,0 +514,0 @@ /**

{
"name": "ploon",
"version": "1.0.5",
"version": "1.0.6",
"description": "Path-Level Object Oriented Notation - The Most Token-Efficient Format for Nested Hierarchical Data",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is too big to display