Server : Apache System : Linux ks5.tuic.fr 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 User : pragmatice ( 1003) PHP Version : 8.2.24 Disable Function : NONE Directory : /home/pragmatice/pragmaclasse_recette/node_modules/replace-ext/ |
'use strict'; var path = require('path'); function replaceExt(npath, ext) { if (typeof npath !== 'string') { return npath; } if (npath.length === 0) { return npath; } var nFileName = path.basename(npath, path.extname(npath)) + ext; return path.join(path.dirname(npath), nFileName); } module.exports = replaceExt;