Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Moving from Underscore to LoDash
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Dec 20, 2013
1 parent bac1a06 commit 9c6e551
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
5 changes: 3 additions & 2 deletions app/controllers/articles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
var mongoose = require('mongoose'),
Article = mongoose.model('Article'),
_ = require('underscore');
_ = require('lodash');


/**
Expand Down Expand Up @@ -78,6 +78,7 @@ exports.show = function(req, res) {
* List of Articles
*/
exports.all = function(req, res) {
console.log(req.user.password);
Article.find().sort('-created').populate('user', 'name username').exec(function(err, articles) {
if (err) {
res.render('error', {
Expand All @@ -87,4 +88,4 @@ exports.all = function(req, res) {
res.jsonp(articles);
}
});
};
};
3 changes: 1 addition & 2 deletions app/controllers/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
_ = require('underscore');
var mongoose = require('mongoose');


exports.render = function(req, res) {
Expand Down
1 change: 0 additions & 1 deletion app/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
crypto = require('crypto'),
_ = require('underscore'),
authTypes = ['github', 'twitter', 'facebook', 'google'];


Expand Down
2 changes: 1 addition & 1 deletion config/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _ = require('underscore');
var _ = require('lodash');

// Load app configuration

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"passport-twitter": "latest",
"passport-github": "latest",
"passport-google-oauth": "latest",
"underscore": "latest",
"lodash": "latest",
"async": "latest",
"view-helpers": "latest",
"mean-logger": "latest",
Expand Down

0 comments on commit 9c6e551

Please sign in to comment.