Skip to content

Commit 063d990

Browse files
committed
refactor(subgen/filter): reuse the capitalize method
1 parent 4f205cd commit 063d990

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

filter/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ var util = require('util');
44
var path = require('path');
55
var yeoman = require('yeoman-generator');
66
var ScriptBase = require('../script-base.js');
7-
8-
function capitalize(string) {
9-
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
10-
}
7+
var nextUtils = require('../util.js');
118

129
var FilterGenerator = module.exports = function(args, options) {
1310
ScriptBase.apply(this, arguments);
1411

1512
this.moduleName = args[0];
1613
this.name = args[1];
17-
this.capitalizedName = capitalize(this.name);
14+
this.capitalizedName = nextUtils.capitalize(this.name);
1815
};
1916

2017
util.inherits(FilterGenerator, ScriptBase);

0 commit comments

Comments
 (0)