Skip to content

Commit

Permalink
style(init): make jshint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Dec 8, 2013
1 parent fa81460 commit eb8d43f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/init/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ var JavaScriptFormatter = function() {
return str.replace(/\n/g, '\n' + pad);
};

var formatQuottedList = function(list) {
return list.map(quote).join(', ');
};

this.TEMPLATE_FILE_PATH = JS_TEMPLATE_PATH;

this.formatFiles = function(includedFiles, onlyServedFiles) {
Expand All @@ -40,19 +44,15 @@ var JavaScriptFormatter = function() {
this.formatPreprocessors = function(preprocessors) {
var lines = [];
Object.keys(preprocessors).forEach(function(pattern) {
lines.push(' ' + quote(pattern) + ': [' + preprocessors[pattern].map(quote).join(', ') + ']');
lines.push(' ' + quote(pattern) + ': [' + formatQuottedList(preprocessors[pattern]) + ']');
});

return pad('{\n' + lines.join(',\n') + '\n}', ' ');
};

this.formatFrameworks = function(frameworks) {
return frameworks.map(quote).join(', ');
};
this.formatFrameworks = formatQuottedList;

this.formatBrowsers = function(browsers) {
return browsers.map(quote).join(', ');
};
this.formatBrowsers = formatQuottedList;

this.formatAnswers = function(answers) {
return {
Expand Down

0 comments on commit eb8d43f

Please sign in to comment.