UNPKG

@zenbase/llml

Version:

Lightweight Language Markup Language - Convert nested data structures to human-readable, XML-like markup

19 lines (16 loc) 462 B
/** * Predicate function that checks if a value matches a specific type */ export type Predicate = (value: unknown) => boolean /** * Format function that transforms a value to a string */ export type Formatter = ( value: unknown, llml: (data: unknown, formatters: Formatters) => string, formatters: Formatters, ) => string /** * Formatters as an iterable of [predicate, formatter] pairs */ export type Formatters = Iterable<[Predicate, Formatter]>