Function: orderedList()
orderedList(items)
orderedList(...
items
):string
Creates an ordered list.
Parameters
• ...items: string
[]
Each item in the list.
Returns
string
The ordered list markdown.
Example
console.log(orderedList('item1', 'item2', 'item3'));
// Prints:
//
// 1. item1
//
// 2. item2
//
// 3. item3
Defined in
orderedList(items)
orderedList(
items
):string
Creates an ordered list.
Parameters
• items: string
[]
Each item in the list.
Returns
string
The ordered list markdown.
Example
console.log(orderedList('item1', 'item2', 'item3'));
// Prints:
//
// 1. item1
//
// 2. item2
//
// 3. item3
Defined in
orderedList(options, items)
orderedList(
options
, ...items
):string
Creates an ordered list.
Parameters
• options: OrderedListOptions
The options for the ordered list. See OrderedListOptions.
• ...items: string
[]
Each item in the list.
Returns
string
The ordered list markdown.
Example
console.log(
orderedList(
'item1',
lines(
'item 2',
orderedList({level: 2}, 'item a', 'item b')
),
'item3'
)
);
// Prints:
//
// 1. item1
//
// 2. item2
//
// 1. item a
//
// 2. item b
//
// 3. item3
Defined in
orderedList(options, items)
orderedList(
options
,items
):string
Creates an ordered list.
Parameters
• options: OrderedListOptions
The options for the ordered list. See OrderedListOptions.
• items: string
[]
Each item in the list.
Returns
string
The ordered list markdown.
Example
console.log(
orderedList(
'item1',
lines(
'item 2',
orderedList({level: 2}, 'item a', 'item b')
),
'item3'
)
);
// Prints:
//
// 1. item1
//
// 2. item2
//
// 1. item a
//
// 2. item b
//
// 3. item3