Skip to content

list()

ts
function list(type, ...nodes): Node;

Defined in: list.ts:38

Builder-element for a list

Parameters

ParameterTypeDescription
typeListTypeType of list
...nodes(string | Node | null | undefined)[]Items of the list

Returns

Node

A markdown node

Example

ts
import { define, list } from "@ogs-gmbh/markdown";

const markdown = define(
  list("unordered", "Computer", "Remote control");
);

console.assert(
  markdown.toString()
);

See

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#lists

Since

1.0.0

Author

Simon Kovtyk