index.js
function replaceExt(fpath, newExt) {
  const oldExt = path.extname(fpath);
  return _nativeExt.includes(oldExt) ? fpath :
    path.join(path.dirname(fpath), path.basename(fpath, oldExt) + newExt);
}
function replaceExt(fpath, newExt) {
  const oldExt = path.extname(fpath);
  return _nativeExt.includes(oldExt) ? fpath :
    path.join(path.dirname(fpath), path.basename(fpath, oldExt) + newExt);
}
function replaceExt ( fpath , newExt ) { const oldExt = path . extname ( fpath ) ; return _nativeExt . includes ( oldExt ) ? fpath : path . join ( path . dirname ( fpath ) , path . basename ( fpath , oldExt ) + newExt ) ; }
Replaces extension of fpath with newExt unless fpath has a .js or .json extension.
Replaces extension of fpath with newExt unless fpath has a . js or . json extension .