Switch from underscore to lodash

This commit is contained in:
Peter Jaszkowiak
2017-05-26 01:39:40 -06:00
parent 033c31719a
commit 3c2d4fe649
29 changed files with 57 additions and 51 deletions

View File

@@ -2,7 +2,7 @@
var async = require('async');
var validator = require('validator');
var _ = require('underscore');
var _ = require('lodash');
var S = require('string');
var posts = require('../../posts');
@@ -69,7 +69,7 @@ module.exports = function (SocketPosts) {
], next);
},
function (results, next) {
var uids = _.unique(_.flatten(results).concat(socket.uid.toString()));
var uids = _.uniq(_.flatten(results).concat(socket.uid.toString()));
uids.forEach(function (uid) {
websockets.in('uid_' + uid).emit('event:post_edited', editResult);
});