@bian-womp/spark-graph 0.3.52 → 0.3.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/index.js.map +1 -1
- package/package.json +2 -2
package/lib/esm/index.js
CHANGED
|
@@ -1266,7 +1266,7 @@ function stringifyJson(obj, oneLiner) {
|
|
|
1266
1266
|
if (!v.length)
|
|
1267
1267
|
return "[]";
|
|
1268
1268
|
const parts = v.map((vv, i) => stringifyInline(vv));
|
|
1269
|
-
return `[
|
|
1269
|
+
return `[${parts.join(", ")}]`;
|
|
1270
1270
|
}
|
|
1271
1271
|
if (t === "object") {
|
|
1272
1272
|
const keys = Object.keys(v);
|
|
@@ -1294,8 +1294,8 @@ function stringifyJson(obj, oneLiner) {
|
|
|
1294
1294
|
if (!v.length)
|
|
1295
1295
|
return "[]";
|
|
1296
1296
|
// Compact array style: `[{...}, {...}]` while still allowing multi-line objects within.
|
|
1297
|
-
const parts = v.map((vv, i) => stringifyPretty(vv, depth
|
|
1298
|
-
return `[
|
|
1297
|
+
const parts = v.map((vv, i) => stringifyPretty(vv, depth, `${path}[${i}]`, String(i)));
|
|
1298
|
+
return `[${parts.join(", ")}]`;
|
|
1299
1299
|
}
|
|
1300
1300
|
if (t === "object") {
|
|
1301
1301
|
const keys = Object.keys(v);
|