Skip to main content

Function: ul()

See unorderedList.

ul(items)

ul(...items): string

Creates an unordered list.

Parameters

• ...items: string[]

Each item in the list.

Returns

string

The unordered list markdown.

Example

console.log(unorderedList('item1', 'item2', 'item3'));
// Prints:
//
// - item1
//
// - item2
//
// - item3

Defined in

lib/markdown.ts:528

ul(items)

ul(items): string

Creates an unordered list.

Parameters

items: string[]

Each item in the list.

Returns

string

The unordered list markdown.

Example

console.log(unorderedList('item1', 'item2', 'item3'));
// Prints:
//
// - item1
//
// - item2
//
// - item3

Defined in

lib/markdown.ts:528

ul(options, items)

ul(options, ...items): string

Creates an unordered list.

Parameters

options: UnorderedListOptions

The options for the unordered list. See UnorderedListOptions.

• ...items: string[]

Each item in the list.

Returns

string

The unordered list markdown.

Example

console.log(
unorderedList(
'item1',
lines(
'item 2',
unorderedList({level: 2}, 'item a', 'item b')
),
'item3'
)
);
// Prints:
//
// - item1
//
// - item2
//
// - item a
//
// - item b
//
// - item3

Defined in

lib/markdown.ts:528

ul(options, items)

ul(options, items): string

Creates an unordered list.

Parameters

options: UnorderedListOptions

The options for the unordered list. See UnorderedListOptions.

items: string[]

Each item in the list.

Returns

string

The unordered list markdown.

Example

console.log(
unorderedList(
'item1',
lines(
'item 2',
unorderedList({level: 2}, 'item a', 'item b')
),
'item3'
)
);
// Prints:
//
// - item1
//
// - item2
//
// - item a
//
// - item b
//
// - item3

Defined in

lib/markdown.ts:528