🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

modify-filename

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modify-filename

Modify the filename in a path

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
257K
39.39%
Maintainers
1
Weekly downloads
 
Created
Source

modify-filename

Modify the filename in a path

Install

npm install modify-filename

Usage

import modifyFilename from 'modify-filename';

modifyFilename('src/unicorn.png', (filename, extension) => {
	return `${filename}-rainbow${extension}`;
});
//=> 'src/unicorn-rainbow.png'

modifyFilename(['src/unicorn.png', 'src/pony.png'], (filename, extension) => {
	return `${filename}-rainbow${extension}`;
});
//=> ['src/unicorn-rainbow.png', 'src/pony-rainbow.png']

Keywords

modify

FAQs

Package last updated on 18 Oct 2021

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