Replaces a file extension with another one.
var replaceExt = require("replace-ext");
var path = "/some/dir/file.js";
var newPath = replaceExt(path, ".coffee");
console.log(newPath); // /some/dir/file.coffeeReplaces the extension from path with extension and returns the updated path string.
Does not replace the extension if path is not a string or is empty.
No LLMs for issues.
No LLMs for patches / pull requests.
No LLMs for comments on the bug tracker, including translation.
English is encouraged, but not required. You are welcome to post in your native language and rely on others to have their own translation tools of choice to interpret your words.
MIT