Skip to the content

Capsid menu

render-hast.mjs

10 lines and 2 functions in DrDustinEdwards/prelum, at commit e389900 on 2026-10-24. This file on GitHub.

Functions

The functions of render-hast.mjs
FunctionLinesComplexityCoveredCRAPMutation
h4 to 91100%OkCRAP 1No data: mutation testing has not run on this repo yet
text12 to 121100%OkCRAP 1No data: mutation testing has not run on this repo yet

Imports

It imports no other module of this repo. Imported by render-diagram.mjs.

Source

// The two hast node builders the chart and diagram renderers write their figures with.

/** @param {string} tagName @param {Record<string, any>} properties @param {any[]} children */
export const h = (tagName, properties, children) => ({
  type: "element",
  tagName,
  properties,
  children,
});

/** @param {string} value */
export const text = (value) => ({ type: "text", value });