Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
get the next duplicate (file-)name providing some kind of simple naming pattern and existing entries + counter
get the next duplicate (file-)name providing some kind of simple naming pattern and existing entries + counter
$ npm install dupli --save
dupli(String, Array, String);
const newName = dupli('copy 1 new document', [], 'copy');
// newName: copy 2 new document
const newName = dupli('new document', ['copy 2 new document', 'copy 1 new document'], 'copy');
// newName: copy 3 new document
please note, the array of files is only used to get the highest number, the string which follows copy 2 for example is not taken in account to match the original filename passed as the first argument. You could as well just pass copy 2, copy 3, the idea here is that the array is an array of filenames which are already duplicates of the same file which gets duplicated using dupli.
Thats due to the necesity of this module, if you need it to be taken into account just fork and add an option and merge back if you like.
FAQs
get the next duplicate (file-)name providing some kind of simple naming pattern and existing entries + counter
We found that dupli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.