const markdownProcessor = require('./markdownProcessor');
const documentFormatter = require('./documentFormatter');

const processData = function processData(data) {
  return markdownProcessor.process(data);
};

const formatData = function formatData(data) {
  return documentFormatter.format(data);
};

const wrapper = {
  render: function render(data) {
    return formatData(processData(data));
  }
};

module.exports = wrapper;


import markdownProcessor from './markdownProcessor';
import documentFormatter from './documentFormatter';

const processData = function processData(data) {
  return markdownProcessor.process(data);
};

const formatData = function formatData(data) {
  return documentFormatter.format(data);
};

export default {
  render: function render(data) {
    return formatData(processData(data));
  }
};

Change all index.js require syntax to import...from