Skip to content

Commit 08bf66d

Browse files
committed
making jshint happy about our code
1 parent 414e828 commit 08bf66d

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

app/scripts/controllers/crunchinator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ angular.module('crunchinatorApp.controllers')
2626
$scope.investors = Investor;
2727
$scope.categories = Category;
2828

29-
Company.fetch().then(function() {
29+
Company.fetch().then(function() {
3030
Company.setupDimensions();
3131
Company.runFilters(filterData);
3232
});

app/scripts/services/category.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ angular.module('crunchinatorApp.models').service('Category', function(Model, API
1414
Category.prototype.setupDimensions = function() {
1515
var crossCategories = crossfilter(this.all);
1616

17-
this.dimensions = {
17+
this.dimensions = {
1818
'byId': crossCategories.dimension(function(category) { return category.id; }),
19-
'byCompanies': crossCategories.dimension(function(category) { return category.company_ids }),
20-
'byInvestors': crossCategories.dimension(function(category) { return category.investor_ids })
19+
'byCompanies': crossCategories.dimension(function(category) { return category.company_ids; }),
20+
'byInvestors': crossCategories.dimension(function(category) { return category.investor_ids; })
2121
};
2222

23-
this.categoriesByName = crossCategories.dimension(function(category) { return category.name });
23+
this.categoriesByName = crossCategories.dimension(function(category) { return category.name; });
2424
};
2525

2626
Category.prototype.filterGroups = {
@@ -53,7 +53,7 @@ angular.module('crunchinatorApp.models').service('Category', function(Model, API
5353
return (ids.length === 0 || ids.indexOf(id) > -1);
5454
});
5555
}
56-
};
56+
};
5757

5858
return new Category();
5959
});

app/scripts/services/investor.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ angular.module('crunchinatorApp.models').service('Investor', function(Model, API
1616
Investor.prototype.setupDimensions = function() {
1717
var crossInvestors = crossfilter(this.all);
1818

19-
this.dimensions = {
19+
this.dimensions = {
2020
'byId': crossInvestors.dimension(function(investor) { return investor.id; }),
21-
'byCompanies': crossInvestors.dimension(function(investor) { return investor.invested_company_ids }),
22-
'byCategories': crossInvestors.dimension(function(investor) { return investor.invested_category_ids })
21+
'byCompanies': crossInvestors.dimension(function(investor) { return investor.invested_company_ids; }),
22+
'byCategories': crossInvestors.dimension(function(investor) { return investor.invested_category_ids; })
2323
};
2424

25-
this.investorsByName = crossInvestors.dimension(function(investor) { return investor.name });
25+
this.investorsByName = crossInvestors.dimension(function(investor) { return investor.name; });
2626
};
2727

2828
Investor.prototype.filterGroups = {
@@ -55,7 +55,7 @@ angular.module('crunchinatorApp.models').service('Investor', function(Model, API
5555
return (ids.length === 0 || ids.indexOf(id) > -1);
5656
});
5757
}
58-
};
58+
};
5959

6060
return new Investor();
6161
});

app/scripts/services/model.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ angular.module('crunchinatorApp.models').service('Model', function($rootScope, $
99
Model.prototype.fetch = function() {
1010
var self = this;
1111
var url = self.url;
12-
var parse = self.parse;
1312

1413
if (!url) { throw new Error('You must specify a url on the class'); }
1514
return $http.get(url).success(function(response) { self.all = self.parse(response); });
@@ -18,26 +17,26 @@ angular.module('crunchinatorApp.models').service('Model', function($rootScope, $
1817
Model.prototype.resetAllDimensions = function() {
1918
_.each(this.dimensions, function (dimension) {
2019
dimension.filterAll();
21-
});
20+
});
2221
};
2322

2423
Model.prototype.runFilters = function(filterData) {
2524
var self = this;
2625
this.filterData = filterData;
27-
_.each(this.filterGroups, function(filterGroupFunction, name) {
26+
_.each(this.filterGroups, function(filterGroupFunction) {
2827
filterGroupFunction.bind(self)();
2928
});
3029
};
3130

3231
Model.prototype.applyFilters = function(exclusions) {
3332
var self = this;
34-
var exclusions = exclusions || [];
33+
exclusions = exclusions || [];
3534
_.each(this.filters, function(filterFunction, filterName) {
3635
if(!_.contains(exclusions, filterName)) {
3736
filterFunction.bind(self)();
3837
}
3938
});
40-
}
39+
};
4140

4241
return new Model();
4342
});

0 commit comments

Comments
 (0)