replace-basename
v1.1.0
Published
Replace the basename of a path
Downloads
3
Readme
replace-basename
Replace the basename of a path
Installation
npm install replace-basename
Usage
import replaceBasename from 'replace-basename';
replaceBasename('/path/to/puppers.mov', 'doggos');
// => '/path/to/doggos.mov'
replaceBasename('/path/to/woofers.mp4', function(path) {
return 'sub' + path;
})
// => '/path/to/subwoofers.mp4'
Local Development
git clone https://github.com/gakimball/replace-basename
cd replace-basename
npm install
npm test
License
MIT © Geoff Kimball