-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
48 lines (48 loc) · 1.39 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* Renaming configuration
*
* If you're missing an action, you can add it here!
*
* When adding args, make sure they can be read in the following sentence:
* 'This function requires a ... '
*/
module.exports = {
default: {
path: 'C:\\Temp',
renameFolders: false,
renameFiles: true
},
actions: {
replaceFirst: {
fn: oldName => (replaceString, withString) => oldName.replace(replaceString, withString),
args: ['string to replace', 'replacement string']
},
replace: {
fn: oldName => (replaceString, withString) => {
const re = new RegExp(replaceString, 'g');
return oldName.replace(re, withString);
},
args: ['string to replace', 'replacement string']
},
reverse: {
fn: oldName => () => oldName.split('').reverse().join(''),
args: []
},
toLowerCase: {
fn: oldName => () => oldName.toLowerCase(),
args: []
},
toUpperCase: {
fn: oldName => () => oldName.toUpperCase(),
args: []
},
append: {
fn: oldName => string => oldName + string,
args: ['string to append']
},
prepend: {
fn: oldName => string => string + oldName,
args: ['string to prepend']
}
}
};