thedesk/app/node_modules/modify-filename
2019-09-12 23:38:13 +09:00
..
index.js Add: node_modules 2019-09-12 23:38:13 +09:00
license Add: node_modules 2019-09-12 23:38:13 +09:00
package.json Add: node_modules 2019-09-12 23:38:13 +09:00
readme.md Add: node_modules 2019-09-12 23:38:13 +09:00

modify-filename Build Status

Modify the filename in a path

Install

$ npm install --save modify-filename

Usage

var modifyFilename = require('modify-filename');

modifyFilename('src/unicorn.png', function (filename, extension) {
	return filename + '-rainbow' + extension;
});
//=> 'src/unicorn-rainbow.png'

modifyFilename(['src/unicorn.png', 'src/pony.png'], function (filename, extension) {
	return filename + '-rainbow' + extension;
});
//=> ['src/unicorn-rainbow.png', 'src/pony-rainbow.png']

License

MIT © Sindre Sorhus