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