Skip to content

Commit a3f0da5

Browse files
committed
describe prettyRegExp and give param an better name
1 parent 084d112 commit a3f0da5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/ContextModule.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ class ContextModule extends Module {
3737
return identifier.replace(/ $/, "");
3838
}
3939

40-
prettyRegExp(str) {
41-
return str.substring(1, str.length - 1);
40+
prettyRegExp(regexString) {
41+
// remove the "/" at the front and the beginning
42+
// "/foo/" -> "foo"
43+
return regexString.substring(1, regexString.length - 1);
4244
}
4345

4446
readableIdentifier(requestShortener) {

0 commit comments

Comments
 (0)