code: function splitTemplate (template) {
    if (!template) {
      return []
    }
    return split(template).filter((seg) => seg !== '' && seg !== undefined)
  }
docs: Split the given template into segments.
  @param {string} template - The template to split
  @returns {string[]} An array of string segments