wallet-core/node_modules/replace-ext
2016-11-03 01:33:53 +01:00
..
index.js node_modules 2016-11-03 01:33:53 +01:00
LICENSE node_modules 2016-11-03 01:33:53 +01:00
package.json node_modules 2016-11-03 01:33:53 +01:00
README.md node_modules 2016-11-03 01:33:53 +01:00

replace-ext

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

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