docs: function append(template, el, referenceNode, replacements/*...*/) {
      var replacementsStartAt = 3,
          referenceNodeOmitted = typeof referenceNode !== 'object';  // replacements are never objects
  
      if (referenceNodeOmitted) {
          referenceNode = null;
          replacementsStartAt = 2;
      }
  
      replacements = Array.prototype.slice.call(arguments, replacementsStartAt);
      var result = [],
          div = replace.apply(null, [template].concat(replacements));
  
      while (div.childNodes.length) {
          result.push(div.firstChild);
          el.insertBefore(div.firstChild, referenceNode); // removes child from div
      }
  
      return result;
  }