code: function splitInput(str) {
    if (str.slice(0, 3) !== '---') return;
  
    var matcher = /\n(\.{3}|-{3})/g;
    var metaEnd = matcher.exec(str);
  
    return metaEnd && [str.slice(0, metaEnd.index), str.slice(matcher.lastIndex)];
  }
docs: Splits the given string into a meta section and a markdown section if a meta section is present, else returns null