2022-04-08 10:55:35 +00:00
|
|
|
# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
|
2022-01-21 08:28:41 +00:00
|
|
|
|
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
## Information
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Package</td><td>replace-ext</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Description</td>
|
|
|
|
<td>Replaces a file extension with another one</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Node Version</td>
|
|
|
|
<td>>= 0.4</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2022-01-21 08:28:41 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
```javascript
|
2022-01-21 08:28:41 +00:00
|
|
|
var replaceExt = require('replace-ext');
|
|
|
|
|
|
|
|
var path = '/some/dir/file.js';
|
2022-04-08 10:55:35 +00:00
|
|
|
var npath = replaceExt(path, '.coffee');
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
console.log(npath); // /some/dir/file.coffee
|
2022-01-21 08:28:41 +00:00
|
|
|
```
|
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
[npm-url]: https://npmjs.org/package/replace-ext
|
|
|
|
[npm-image]: https://badge.fury.io/js/replace-ext.png
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
[travis-url]: https://travis-ci.org/wearefractal/replace-ext
|
|
|
|
[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext
|
|
|
|
[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
[depstat-url]: https://david-dm.org/wearefractal/replace-ext
|
|
|
|
[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2022-04-08 10:55:35 +00:00
|
|
|
[david-url]: https://david-dm.org/wearefractal/replace-ext
|
|
|
|
[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io
|