dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/replace-ext/index.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

9 lines
No EOL
276 B
JavaScript

var path = require('path');
module.exports = function(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);
};