rerename
v1.0.4
Published
1. `filterFiles`: Get all files match given regex under a given path.
Downloads
2
Readme
Regex Rename lib for Node.JS
####Usage
filterFiles
: Get all files match given regex under a given path.
const { filterFiles } = require('rerename');
const fileNames = filterFiles('./', (x) => x.startsWidth('test'));
rerename
: Rename a list of file with given transformer function.
const { rerename } = require('rerename');
const fileNames = ['xxx'];
rerename(fileNames, (x) => x.replace('test', ''));