UNPKG

yaml-unist-parser

Version:

A YAML parser that produces output compatible with unist

10 lines (9 loc) 336 B
import { createLeadingCommentAttachable } from "./leading-comment-attachable.js"; import { createNode } from "./node.js"; export function createMappingItem(position, key, value) { return { ...createNode("mappingItem", position), ...createLeadingCommentAttachable(), children: [key, value], }; }