Skip to main content

Variable: ul

const ul: {(...items): string; (items): string; (options, ...items): string; (options, items): string; } = unorderedList

Defined in: lib/markdown.ts:539

See unorderedList.

Call Signature​

(...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

Call Signature​

(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

Call Signature​

(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

Call Signature​

(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