/**
 * Writes chunks of rich text into a plain text. The implementation is simple: just strip any style
 * information from the rich text.
 *
 * @param {Array} chunks The rich text chunks to write.
 */
'use strict';

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = writeText;

function writeText(chunks) {
  var text = '';

  if (!chunks) {
    chunks = [];
  }

  chunks.forEach(function (c) {
    text += c.text;
  });

  return text;
}

module.exports = exports['default'];