code: function removeExtensions(filename) {
      var extension = path.extname(filename);
      while (extension !== '') {
        filename = path.basename(filename, extension);
        extension = path.extname(filename);
      }
      return filename;
    }
docs: Removes all extensions from the given filename.
  @param {string} filename
  @return {string}