UNPKG

yaml-unist-parser

Version:

A YAML parser that produces output compatible with unist

10 lines (9 loc) 360 B
import { createEndCommentAttachable } from "./end-comment-attachable.js"; import { createNode } from "./node.js"; export function createDocumentBody(position, content, endComments) { return { ...createNode("documentBody", position), ...createEndCommentAttachable(endComments), children: !content ? [] : [content], }; }