replace-ext
    Overview
    Documentation
    Tutorials
    Chat
    Insights
    Code
    Dependencies
    Contributors
    Jobs

replace-ext

Replaces a file extension with another one

1.0.0  •  Updated 2 years ago  •  by gulpjs  •  MIT License

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

Popularity

Maintenance

Development

Last ver 4 years ago
Created 6 years ago
Last commit 4 months ago
5 months between commits

Technology

Node version: 0.10.41
0 unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

5 contributors
Blaine Bublitz
Maintainer, 4 commits, 1 merges
Works at Paying the maintainers Tidelift
sttk
Maintainer, 3 commits, 2 PRs
Works at self-employed
Contra
Maintainer, 1 commits
Works at staeco
Erik Kemperman
1 commits, 1 PRs
eugenelim
1 PRs

Tags

gulp
extensions
filepath
basename
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookTwitterLinkedIn
© 2020 Devstore, Inc.