ArrayFormatterConfig
Options for controlling how arrays are formatted.
Properties
Section titled “Properties”delimiters
Section titled “delimiters”delimiters:
object
Bracket delimiters
close:
string
open:
string
Default Value
Section titled “Default Value”'[]'maxInlineItems
Section titled “maxInlineItems”maxInlineItems:
number
Max items for inline output.
Default Value
Section titled “Default Value”10maxInlineLength
Section titled “maxInlineLength”maxInlineLength:
number
Max total characters for inline output.
Default Value
Section titled “Default Value”40maxItems
Section titled “maxItems”maxItems:
number
Max items to show in multiline output.
Default Value
Section titled “Default Value”100overflowMessage()
Section titled “overflowMessage()”overflowMessage: (
length,remaining) =>string
Called when items are truncated
Parameters
Section titled “Parameters”length
Section titled “length”number
remaining
Section titled “remaining”number
Returns
Section titled “Returns”string
prefix
Section titled “prefix”prefix:
string
Prefix for array items. Can be used to create YAML formatter.
Default Value
Section titled “Default Value”''separator
Section titled “separator”separator:
string
Separator for multline output
Default Value
Section titled “Default Value”','separatorInline
Section titled “separatorInline”separatorInline:
string
Separator for inline output
Default Value
Section titled “Default Value”', 'shouldInline()
Section titled “shouldInline()”shouldInline: (
arr) =>boolean
Custom hook to force inline.
Parameters
Section titled “Parameters”unknown[]
Returns
Section titled “Returns”boolean
sparseArrayEmptyElement
Section titled “sparseArrayEmptyElement”sparseArrayEmptyElement:
string
String represents empty sparse array entry.
Default Value
Section titled “Default Value”'<empty>'trailingComma
Section titled “trailingComma”trailingComma:
boolean
Include a trailing comma in multiline.
Default Value
Section titled “Default Value”false