mirror of
https://github.com/kforney/pentest-distro-builder.git
synced 2024-10-06 12:38:52 -06:00
.. | ||
index.js | ||
package.json | ||
README.md |
replace-ext
Replaces a file extension with another one.
Usage
var replaceExt = require('replace-ext');
var path = '/some/dir/file.js';
var newPath = replaceExt(path, '.coffee');
console.log(newPath); // /some/dir/file.coffee
API
replaceExt(path, extension)
Replaces the extension from path
with extension
and returns the updated path string.
Does not replace the extension if path
is not a string or is empty.
License
MIT