UNPKG

avifors

Version:

A MDE tool that generates code from a YAML definition of your app domain model.

16 lines (13 loc) 435 B
export default class InterfacePrinter { constructor(avifors, yamlHelper) { this.avifors = avifors this.yamlHelper = yamlHelper } print() { return this.yamlHelper.print(this.avifors.generators.map(i => ({name: i.name, arguments: i.arguments.normalize()}))) } printItem(name) { const item = this.avifors.generators.find(i => i.name === name) return this.yamlHelper.print(item.arguments.normalize()) } }