@cbortech/cbor 0.26.4 → 0.26.5
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/README.ja.md +8 -4
- package/README.md +9 -4
- package/dist/ast/CborAppSeqResult.d.ts +3 -0
- package/dist/ast/index.cjs +1 -1
- package/dist/ast/index.js +1 -1
- package/dist/cdn/serialize-utils.d.ts +3 -2
- package/dist/extensions/types.d.ts +3 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{mapEntries-DDJxbotH.cjs → mapEntries-6hy7UgeN.cjs} +6 -6
- package/dist/mapEntries-6hy7UgeN.cjs.map +1 -0
- package/dist/{mapEntries-hyNVtz5Z.js → mapEntries-Clr-oNtQ.js} +37 -40
- package/dist/mapEntries-Clr-oNtQ.js.map +1 -0
- package/dist/types.d.ts +18 -4
- package/package.json +1 -1
- package/dist/mapEntries-DDJxbotH.cjs.map +0 -1
- package/dist/mapEntries-hyNVtz5Z.js.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -451,6 +451,11 @@ export interface ToCDNOptions {
|
|
|
451
451
|
* - `number`: number of spaces
|
|
452
452
|
* - `string`: literal indent string (e.g. `'\t'`)
|
|
453
453
|
* - omit for single-line output
|
|
454
|
+
*
|
|
455
|
+
* Like `JSON.stringify`, `0` and `''` are equivalent to omitting the
|
|
456
|
+
* option: the output is a single line. Single-line output is guaranteed
|
|
457
|
+
* to contain no newlines; layout-dependent options (`preserveComments`,
|
|
458
|
+
* `splitCdn`, `splitNewline`, `preserveConcatenation`) are ignored.
|
|
454
459
|
*/
|
|
455
460
|
indent?: number | string;
|
|
456
461
|
/**
|
|
@@ -465,8 +470,9 @@ export interface ToCDNOptions {
|
|
|
465
470
|
* kept as-is.
|
|
466
471
|
* - `false` / omitted: strip all comments from the output.
|
|
467
472
|
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
473
|
+
* Only effective when `indent` enables pretty-printing: single-line
|
|
474
|
+
* output strips all comments, since line comments (`#`, `//`) can only
|
|
475
|
+
* be terminated by a newline.
|
|
470
476
|
*
|
|
471
477
|
* @default false
|
|
472
478
|
*/
|
|
@@ -485,6 +491,10 @@ export interface ToCDNOptions {
|
|
|
485
491
|
* When enabled, this takes precedence over `bstrEncoding` and `sqstr` for
|
|
486
492
|
* byte strings that carry original EDN source text.
|
|
487
493
|
*
|
|
494
|
+
* In single-line output (no `indent`), an original spelling that spans
|
|
495
|
+
* multiple lines (e.g. a byte string literal with interior line comments)
|
|
496
|
+
* falls back to normal serialization; single-line spellings are kept.
|
|
497
|
+
*
|
|
488
498
|
* @default false
|
|
489
499
|
*/
|
|
490
500
|
preserveByteString?: boolean;
|
|
@@ -501,6 +511,9 @@ export interface ToCDNOptions {
|
|
|
501
511
|
* Raw byte string forms (e.g. `` h`...` ``) are covered by
|
|
502
512
|
* `preserveByteString`, not this option.
|
|
503
513
|
*
|
|
514
|
+
* In single-line output (no `indent`), a spelling that spans multiple
|
|
515
|
+
* lines falls back to normal escaping; single-line spellings are kept.
|
|
516
|
+
*
|
|
504
517
|
* @default false
|
|
505
518
|
*/
|
|
506
519
|
preserveRawString?: boolean;
|
|
@@ -556,7 +569,7 @@ export interface ToCDNOptions {
|
|
|
556
569
|
floatFormat?: 'decimal' | 'hex';
|
|
557
570
|
/**
|
|
558
571
|
* Split long text strings using CDN string concatenation syntax (`"a" + "b"`).
|
|
559
|
-
* Only effective when `indent`
|
|
572
|
+
* Only effective when `indent` enables pretty-printing.
|
|
560
573
|
*
|
|
561
574
|
* - `'newline'`: split at newline characters
|
|
562
575
|
* - `'cdn'`: split according to CDN structure when the string content
|
|
@@ -612,7 +625,8 @@ export interface ToCDNOptions {
|
|
|
612
625
|
* text strings whose content parses as CDN, while `splitNewline` combines
|
|
613
626
|
* with this option by further splitting the preserved parts at newline
|
|
614
627
|
* characters. Has no effect on values that did not originate from a CDN
|
|
615
|
-
* concatenation
|
|
628
|
+
* concatenation, and only takes effect when `indent` enables
|
|
629
|
+
* pretty-printing (single-line output joins the parts into one literal).
|
|
616
630
|
*
|
|
617
631
|
* @default false
|
|
618
632
|
*/
|