From d1291f67551c58168af43698a359cb5ddfd266b0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 3 Nov 2016 01:33:53 +0100 Subject: node_modules --- node_modules/gulp-util/lib/replaceExtension.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 node_modules/gulp-util/lib/replaceExtension.js (limited to 'node_modules/gulp-util/lib/replaceExtension.js') diff --git a/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-util/lib/replaceExtension.js new file mode 100644 index 000000000..3f76938e4 --- /dev/null +++ b/node_modules/gulp-util/lib/replaceExtension.js @@ -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); +}; \ No newline at end of file -- cgit v1.2.3