code: function getFilenameWithoutExtension(filename) {
          var index = filename.lastIndexOf(".");
          return index === -1 ? filename : filename.slice(0, index);
      }
docs: Get the file name without the extension. Returns "" if name starts with "."
  @param {string} filename File name of a file or directory, without preceding path
  @return {string} Returns the file name without the extension