forked from enviPath/enviPy
Current Dev State
This commit is contained in:
9
static/js/ketcher2/node_modules/replace-ext/index.js
generated
vendored
Normal file
9
static/js/ketcher2/node_modules/replace-ext/index.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
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);
|
||||
};
|
||||
Reference in New Issue
Block a user