This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/replace-ext
cranberry ed23347e56 Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
..
LICENSE Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
README.md Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
index.js Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
package.json Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00

README.md

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