Socket
Socket
Sign inDemoInstall

replace-ext

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replace-ext

Replaces a file extension with another one.


Version published
Weekly downloads
5.5M
decreased by-1.05%
Maintainers
2
Weekly downloads
 
Created

What is replace-ext?

The replace-ext npm package is a utility for replacing the extension of a file path string. It is particularly useful in build processes and file manipulation tasks where you need to change file extensions programmatically.

What are replace-ext's main functionalities?

Replace File Extension

This feature allows you to replace the extension of a given file path. In the code sample, the extension of 'file.txt' is changed to '.md', resulting in 'file.md'.

const replaceExt = require('replace-ext');
const filePath = 'example/file.txt';
const newFilePath = replaceExt(filePath, '.md');
console.log(newFilePath); // Outputs: 'example/file.md'

Other packages similar to replace-ext

Keywords

FAQs

Package last updated on 04 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc