
Research
PyPI Package Impersonates SymPy to Deliver Cryptomining Malware
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.
easy-renamer
Advanced tools
Easily rename files using custom rename functions that are automatically used against any filepaths that match the associated regex or glob patterns.
Easily rename files using custom rename functions that are automatically used against any filepaths that match the associated regex or glob patterns.
Install with npm:
$ npm install easy-renamer --save
See examples. To run the examples, git clone the project then run the following from the root of the project:
$ npm i && node example
var Renamer = require('easy-renamer');
var renamer = new Renamer({destBase: 'foo/bar'});
renamer.matcher('*.md', function(file) {
return path.join(file.dirname, file.filename + '.html');
});
renamer.rename('a/b/c.md');
//=> 'a/b/c.html'
Example with multiple patterns
var Renamer = require('easy-renamer');
var renamer = new Renamer();
function extname(ext) {
return function(file) {
return path.join(file.dirname, file.filename + ext);
};
}
// use glob patterns...
renamer.matcher('**/*.md', extname('.html'));
// or regex
renamer.matcher(/foo\/.*\.less$/, extname('.css'));
glob('**/*', function(err, files) {
files.forEach(function(fp) {
fp = renamer.rename(fp);
//=> do something with fp...
});
});
v0.3.0
.match() method to .matcher() (this is the last time, I promise!)file.name property was renamed to file.filenamev0.2.0
.pattern() method to .match()You might also be interested in these projects:
rename function for the keys,… more | homepagepath.parse, parses a filepath into an object. | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v, on April 02, 2016.
FAQs
Easily rename files using custom rename functions that are automatically used against any filepaths that match the associated regex or glob patterns.
We found that easy-renamer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.