code: function addTemplate (poet, data) {
    if (!data.ext || !data.fn)
      throw new Error('Template must have both an extension and formatter function');
  
    [].concat(data.ext).map(function (ext) {
      poet.templates[ext] = data.fn;
    });
  
    return poet;
  }
docs: Adds `data.fn` as a template formatter for all files with
  extension `data.ext`, which may be a string or an array of strings.
  Adds to `poet` instance templates.
  
  @params {Poet} poet
  @params {Object} data
  @returns {Poet}