import { render as ciRenderer } from './ci' ; import { render as blessedRenderer } from './blessed' ; import { render as inlineTableRenderer } from './inlinetable' ; import { render as jsonRenderer } from './json' ; const renderers = { BLESSED : blessedRenderer , INLINETABLE : inlineTableRenderer , CI : ciRenderer , JSON : jsonRenderer } ; param { string } rendererName returns export function rendererExists ( rendererName ) { return typeof renderers [ rendererName . toUpperCase ( ) ] !== 'undefined' ; } ; param { string } rendererName returns export function getRenderer ( rendererName ) { if ( ! rendererExists ( rendererName ) ) { throw new Error ( `Renderer ${ rendererName } not found in renderers` ) ; } return renderers [ rendererName . toUpperCase ( ) ] ; } ;