.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / replace-ext / README.md
1 <p align="center">
2   <a href="http://gulpjs.com">
3     <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
4   </a>
5 </p>
6
7 # replace-ext
8
9 [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
10
11 Replaces a file extension with another one.
12
13 ## Usage
14
15 ```js
16 var replaceExt = require('replace-ext');
17
18 var path = '/some/dir/file.js';
19 var newPath = replaceExt(path, '.coffee');
20
21 console.log(newPath); // /some/dir/file.coffee
22 ```
23
24 ## API
25
26 ### `replaceExt(path, extension)`
27
28 Replaces the extension from `path` with `extension` and returns the updated path string.
29
30 Does not replace the extension if `path` is not a string or is empty.
31
32 ## License
33
34 MIT
35
36 [downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg
37 [npm-url]: https://www.npmjs.com/package/replace-ext
38 [npm-image]: http://img.shields.io/npm/v/replace-ext.svg
39
40 [travis-url]: https://travis-ci.org/gulpjs/replace-ext
41 [travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci
42
43 [appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext
44 [appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor
45
46 [coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext
47 [coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg
48
49 [gitter-url]: https://gitter.im/gulpjs/gulp
50 [gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg