lib/utils/path.js
function setExtension(filename, ext) {
    return path.join(
        path.dirname(filename),
        path.basename(filename, path.extname(filename)) + ext
    );
}
function setExtension(filename, ext) {
    return path.join(
        path.dirname(filename),
        path.basename(filename, path.extname(filename)) + ext
    );
}
function setExtension ( filename , ext ) { return path . join ( path . dirname ( filename ) , path . basename ( filename , path . extname ( filename ) ) + ext ) ; }
Chnage extension of a file
Chnage extension of a file