UNPKG

json-schema-describes-subset

Version:

Tools for static JSON schema analysis, including functions to determine if one schema describes a subset of another or if a schema describes the empty set or to convert a schema to its disjunctive normal form (DNF).

14 lines 480 B
export function wrapBackTicks(text) { return `\`${text}\``; } export function wrapCodeBlock(code, language = '') { // remove trailing empty line const lines = code.split('\n'); const lastLine = lines.pop(); if (lastLine !== undefined && lastLine.trim() !== '') { lines.push(lastLine); } const tripleBacktick = '```'; return `${tripleBacktick}${language}\n${lines.join('\n')}\n${tripleBacktick}`; } //# sourceMappingURL=markdown-utils.js.map