From 50504943450810771aeb47d1c816c82c89d6da50 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Wed, 18 May 2022 21:38:13 +0300 Subject: [PATCH] docs: Document defaultStringType option more explicitly --- docs/03_options.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/03_options.md b/docs/03_options.md index 837df212..d2aa82ba 100644 --- a/docs/03_options.md +++ b/docs/03_options.md @@ -146,22 +146,22 @@ The `doc.toString()` method may be called with additional options to control the Used by: `stringify()` and `doc.toString()` -| Name | Type | Default | Description | -| ------------------------------ | -------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| blockQuote | `boolean ⎮ 'folded' ⎮ 'literal'` | `true` | Use block quote styles for scalar values where applicable. Set to `false` to disable block quotes completely. | -| collectionStyle | `'any' ⎮ 'block' ⎮ 'flow'` | `'any'` | Enforce `'block'` or `'flow'` style on maps and sequences. By default, allows each collection to set its own `flow: boolean` property. | -| commentString | `(comment: string) => string` | | Output should be valid for the current schema. By default, empty comment lines are left empty, lines consisting of a single space are replaced by `#`, and all other lines are prefixed with a `#`. | -| defaultKeyType | `Type ⎮ null` | `null` | If not `null`, overrides `defaultStringType` for implicit key values. | -| defaultStringType | `Type` | `'PLAIN'` | The default type of string literal used to stringify values. | -| directives | `boolean ⎮ null` | `null` | Include directives in the output. If `true`, at least the document-start marker `---` is always included. If `false`, no directives or marker is ever included. If `null`, directives and marker may be included if required. | -| doubleQuotedAsJSON | `boolean` | `false` | Restrict double-quoted strings to use JSON-compatible syntax. | -| doubleQuotedMinMultiLineLength | `number` | `40` | Minimum length for double-quoted strings to use multiple lines to represent the value. | -| falseStr | `string` | `'false'` | String representation for `false` values. | -| indent | `number` | `2` | The number of spaces to use when indenting code. Should be a strictly positive integer. | -| indentSeq | `boolean` | `true` | Whether block sequences should be indented. | -| lineWidth | `number` | `80` | Maximum line width (set to `0` to disable folding). This is a soft limit, as only double-quoted semantics allow for inserting a line break in the middle of a word. | -| minContentWidth | `number` | `20` | Minimum line width for highly-indented content (set to `0` to disable). | -| nullStr | `string` | `'null'` | String representation for `null` values. | -| simpleKeys | `boolean` | `false` | Require keys to be scalars and always use implicit rather than explicit notation. | -| singleQuote | `boolean ⎮ null` | `null` | Use 'single quote' rather than "double quote" where applicable. Set to `false` to disable single quotes completely. | -| trueStr | `string` | `'true'` | String representation for `true` values. | +| Name | Type | Default | Description | +| ------------------------------ | ----------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| blockQuote | `boolean ⎮ 'folded' ⎮ 'literal'` | `true` | Use block quote styles for scalar values where applicable. Set to `false` to disable block quotes completely. | +| collectionStyle | `'any' ⎮ 'block' ⎮ 'flow'` | `'any'` | Enforce `'block'` or `'flow'` style on maps and sequences. By default, allows each collection to set its own `flow: boolean` property. | +| commentString | `(comment: string) => string` | | Output should be valid for the current schema. By default, empty comment lines are left empty, lines consisting of a single space are replaced by `#`, and all other lines are prefixed with a `#`. | +| defaultKeyType | `'BLOCK_FOLDED' ⎮ 'BLOCK_LITERAL' ⎮` `'QUOTE_DOUBLE' ⎮ 'QUOTE_SINGLE' ⎮` `'PLAIN' ⎮ null` | `null` | If not `null`, overrides `defaultStringType` for implicit key values. | +| defaultStringType | `'BLOCK_FOLDED' ⎮ 'BLOCK_LITERAL' ⎮` `'QUOTE_DOUBLE' ⎮ 'QUOTE_SINGLE' ⎮` `'PLAIN'` | `'PLAIN'` | The default type of string literal used to stringify values. | +| directives | `boolean ⎮ null` | `null` | Include directives in the output. If `true`, at least the document-start marker `---` is always included. If `false`, no directives or marker is ever included. If `null`, directives and marker may be included if required. | +| doubleQuotedAsJSON | `boolean` | `false` | Restrict double-quoted strings to use JSON-compatible syntax. | +| doubleQuotedMinMultiLineLength | `number` | `40` | Minimum length for double-quoted strings to use multiple lines to represent the value. | +| falseStr | `string` | `'false'` | String representation for `false` values. | +| indent | `number` | `2` | The number of spaces to use when indenting code. Should be a strictly positive integer. | +| indentSeq | `boolean` | `true` | Whether block sequences should be indented. | +| lineWidth | `number` | `80` | Maximum line width (set to `0` to disable folding). This is a soft limit, as only double-quoted semantics allow for inserting a line break in the middle of a word. | +| minContentWidth | `number` | `20` | Minimum line width for highly-indented content (set to `0` to disable). | +| nullStr | `string` | `'null'` | String representation for `null` values. | +| simpleKeys | `boolean` | `false` | Require keys to be scalars and always use implicit rather than explicit notation. | +| singleQuote | `boolean ⎮ null` | `null` | Use 'single quote' rather than "double quote" where applicable. Set to `false` to disable single quotes completely. | +| trueStr | `string` | `'true'` | String representation for `true` values. |