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