akuimov/project-lvl2-s341

View on GitHub
src/renders/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import renderast from './renderast';
import renderformat from './renderformatast';

const rendering = {
  start: renderast,
  format: renderformat,
  json: JSON.stringify,
};

export default (ast, option = 'start') => rendering[option](ast);