initial commit
This commit is contained in:
18
node_modules/replace-ext/index.js
generated
vendored
Normal file
18
node_modules/replace-ext/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
'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;
|
||||
Reference in New Issue
Block a user