@bian-womp/spark-graph 0.3.52 → 0.3.53
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/cjs/index.cjs
CHANGED
|
@@ -1268,7 +1268,7 @@ function stringifyJson(obj, oneLiner) {
|
|
|
1268
1268
|
if (!v.length)
|
|
1269
1269
|
return "[]";
|
|
1270
1270
|
const parts = v.map((vv, i) => stringifyInline(vv));
|
|
1271
|
-
return `[
|
|
1271
|
+
return `[${parts.join(", ")}]`;
|
|
1272
1272
|
}
|
|
1273
1273
|
if (t === "object") {
|
|
1274
1274
|
const keys = Object.keys(v);
|
|
@@ -1296,8 +1296,8 @@ function stringifyJson(obj, oneLiner) {
|
|
|
1296
1296
|
if (!v.length)
|
|
1297
1297
|
return "[]";
|
|
1298
1298
|
// Compact array style: `[{...}, {...}]` while still allowing multi-line objects within.
|
|
1299
|
-
const parts = v.map((vv, i) => stringifyPretty(vv, depth
|
|
1300
|
-
return `[
|
|
1299
|
+
const parts = v.map((vv, i) => stringifyPretty(vv, depth, `${path}[${i}]`, String(i)));
|
|
1300
|
+
return `[${parts.join(", ")}]`;
|
|
1301
1301
|
}
|
|
1302
1302
|
if (t === "object") {
|
|
1303
1303
|
const keys = Object.keys(v);
|