JSFiddle - React, Tailwind, and code Playground
by Allendar
JavaScript
String.prototype.removeExtension = function(){
return (this.lastIndexOf('.') !== -1) ? this.substr(0, this.lastIndexOf('.')) : this.toString();
}
console.log('image'.removeExtension());