Initial commit
[yaffs-website] / node_modules / replace-ext / index.js
1 var path = require('path');
2
3 module.exports = function(npath, ext) {
4   if (typeof npath !== 'string') return npath;
5   if (npath.length === 0) return npath;
6
7   var nFileName = path.basename(npath, path.extname(npath))+ext;
8   return path.join(path.dirname(npath), nFileName);
9 };